public void AddInvalid_Import_Include(String testDir, String testFile)
{
Initialize();
string xsd = Path.Combine(path, testDir, testFile);
XmlSchemaSet ss = new XmlSchemaSet();
ss.XmlResolver = new XmlUrlResolver();
XmlSchema Schema = XmlSchema.Read(XmlReader.Create(xsd), ValidationCallback);
XmlSchema Schema1 = null;
try
{
Schema1 = ss.Add(Schema);
Assert.True(false);
}
catch (XmlSchemaException e)
{
_output.WriteLine(e.Message);
}
ValidateSchemaSet(ss, 0, false, 0, 0, 0, "Validation after add");
ss.Compile();
ValidateSchemaSet(ss, 0, true, 0, 0, 0, "Validation after add/comp");
ValidateWithSchemaInfo(ss);
XmlSchema Schema2 = null;
foreach (XmlSchema schema in ss.Schemas())
Schema2 = ss.Reprocess(schema);
ValidateSchemaSet(ss, 0, true, 0, 0, 0, "Validation after repr");
ValidateWithSchemaInfo(ss);
ss.Compile();
ValidateSchemaSet(ss, 0, true, 0, 0, 0, "Validation after repr/comp");
foreach (XmlSchema schema in ss.Schemas())
ss.Reprocess(schema);
ValidateWithSchemaInfo(ss);
return;
}
}