System.Xml.Tests.TC_SchemaSet_Reprocess.v11 C# (CSharp) Method

v11() private method

private v11 ( ) : void
return void
        public void v11()
        {
            bWarningCallback = false;
            bErrorCallback = false;

            XmlSchemaSet sc = new XmlSchemaSet();
            sc.XmlResolver = new XmlUrlResolver();

            sc.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);

            XmlSchema Schema1 = sc.Add(null, Path.Combine(TestData._Root, "include_v1_a.xsd"));
            CError.Compare(sc.Count, 1, "Count after add");
            CError.Compare(sc.Contains(Schema1), true, "Contains after add");

            sc.Compile();
            CError.Compare(sc.Count, 1, "Count after add/comp");
            CError.Compare(sc.Contains(Schema1), true, "Contains after add/comp");
            //edit
            foreach (XmlSchemaInclude inc in Schema1.Includes)
            {
                inc.SchemaLocation = "bogus";
                inc.Schema = null;
            }

            sc.Reprocess(Schema1);
            ValidateSchemaSet(sc, 1, false, 1, 0, 0, "Validation after edit/reprocess");
            CError.Compare(bWarningCallback, true, "Warning repr");
            CError.Compare(bErrorCallback, false, "Error repr");

            sc.Compile();
            ValidateSchemaSet(sc, 1, true, 2, 2, 0, "Validation after comp/reprocess");
            CError.Compare(bWarningCallback, true, "Warning comp");
            CError.Compare(bErrorCallback, false, "Error comp");
            CError.Compare(Schema1.IsCompiled, true, "IsCompiled on SOM");
            return;
        }