public void v202()
{
XmlSchemaSet sc = new XmlSchemaSet();
sc.XmlResolver = new XmlUrlResolver();
XmlSchema schema = new XmlSchema();
sc.Add(null, TestData._XsdNoNs);
CError.Compare(sc.Count, 1, "AddCount");
CError.Compare(sc.IsCompiled, false, "AddIsCompiled");
sc.Compile();
CError.Compare(sc.IsCompiled, true, "IsCompiled");
CError.Compare(sc.Count, 1, "Count");
try
{
sc.Reprocess(schema);
Assert.True(false);
}
catch (ArgumentException) { }
CError.Compare(sc.IsCompiled, true, "ReprocessIsCompiled");
CError.Compare(sc.Count, 1, "ReprocessCount");
try
{
schema = sc.Add(null, Path.Combine(TestData._Root, "include_v2.xsd"));
}
catch (XmlSchemaException)
{
// no schema should be addded to the set.
CError.Compare(sc.Count, 1, "Count");
CError.Compare(sc.IsCompiled, true, "IsCompiled");
try
{
sc.Reprocess(schema);
Assert.True(false);
}
catch (ArgumentException) { }
CError.Compare(sc.IsCompiled, true, "ReprocessIsCompiled");
CError.Compare(sc.Count, 1, "ReprocessCount");
return;
}
Assert.True(false);
}