System.Xml.Tests.TCValidateAfterAdd.v1 C# (CSharp) Method

v1() private method

private v1 ( String testDir, String testFile, int expCount, int expCountGT, int expCountGE, int expCountGA ) : void
testDir String
testFile String
expCount int
expCountGT int
expCountGE int
expCountGA int
return void
        public void v1(String testDir, String testFile, int expCount, int expCountGT, int expCountGE, int expCountGA)
        {
            Initialize();
            string xsd = Path.Combine(path, testDir, testFile);

            XmlSchemaSet ss = new XmlSchemaSet();
            XmlSchema Schema = XmlSchema.Read(XmlReader.Create(xsd), ValidationCallback);
            ss.XmlResolver = new XmlUrlResolver();

            XmlSchema Schema1 = ss.Add(Schema);
            ValidateSchemaSet(ss, expCount, false, 0, 0, 0, "Validation after add");
            ValidateWithSchemaInfo(ss);

            ss.Compile();
            ValidateSchemaSet(ss, expCount, true, expCountGT, expCountGE, expCountGA, "Validation after add/comp");
            ValidateWithSchemaInfo(ss);

            XmlSchema Schema2 = null;
            foreach (XmlSchema schema in ss.Schemas())
                Schema2 = ss.Reprocess(schema);

            ValidateSchemaSet(ss, expCount, false, 1, 0, 0, "Validation after repr");
            ValidateWithSchemaInfo(ss);

            ss.Compile();
            ValidateSchemaSet(ss, expCount, true, expCountGT, expCountGE, expCountGA, "Validation after repr/comp");
            ValidateWithSchemaInfo(ss);

            Assert.Equal(ss.RemoveRecursive(Schema), true);
            ValidateSchemaSet(ss, 0, false, 1, 0, 0, "Validation after remRec");
            ValidateWithSchemaInfo(ss);

            ss.Compile();
            ValidateSchemaSet(ss, 0, true, 0, 0, 0, "Validation after remRec/comp");
            ValidateWithSchemaInfo(ss);

            return;
        }