public void v1(String testDir, String testFile, int expCount, int expCountGT, int expCountGE, int expCountGA, int expCountGER, int expCountGERC)
{
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);
ss.Remove(Schema);
ValidateSchemaSet(ss, expCount - 1, false, 1, expCountGER, 0, "Validation after remove");
ValidateWithSchemaInfo(ss);
ss.Compile();
ValidateSchemaSet(ss, expCount - 1, true, expCountGERC, expCountGER, 0, "Validation after rem/comp");
ValidateWithSchemaInfo(ss);
XmlSchema Schema2 = null;
try
{
Schema2 = ss.Reprocess(Schema);
Assert.True(false);
}
catch (ArgumentException e)
{
_output.WriteLine(e.Message);
}
ValidateSchemaSet(ss, expCount - 1, true, expCountGERC, expCountGER, 0, "Validation after repr");
ValidateWithSchemaInfo(ss);
Assert.Equal(ss.RemoveRecursive(Schema), false);
ValidateSchemaSet(ss, expCount - 1, true, expCountGERC, expCountGER, 0, "Validation after add");
ValidateWithSchemaInfo(ss);
ss.Compile();
ValidateSchemaSet(ss, expCount - 1, true, expCountGERC, expCountGER, 0, "Validation after remRec/comp");
ValidateWithSchemaInfo(ss);
return;
}