System.Xml.Tests.TC_SchemaSet_ProhibitDTD.v4 C# (CSharp) Method

v4() private method

private v4 ( ) : void
return void
        public void v4()
        {
            Initialize();
            XmlSchemaSet xss = new XmlSchemaSet();
            xss.XmlResolver = new XmlUrlResolver();
            xss.ValidationEventHandler += ValidationCallback;
            XmlReader r = CreateReader(Path.Combine(TestData._Root, "bug356711.xsd"));
            try
            {
                xss.Add(null, r);
            }
            catch (XmlException)
            {
                Assert.True(false); //exepect a validation warning for unresolvable schema location
            }
            CError.Compare(warningCount, 1, "Warning Count mismatch");
            return;
        }