public void v7()
{
try
{
XmlSchemaSet sc = new XmlSchemaSet();
XmlSchema Schema1 = sc.Add(null, TestData._XsdAuthor);
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");
CError.Compare(sc.Contains(Schema1), true, "Contains");
//edit
XmlSchemaAttribute attributeDog = new XmlSchemaAttribute();
Schema1.Items.Add(attributeDog);
attributeDog.Name = "dog";
attributeDog.SchemaTypeName = new XmlQualifiedName("blah", "http://www.w3.org/2001/XMLSchema");
sc.Reprocess(Schema1);
CError.Compare(sc.Count, 1, "Count");
CError.Compare(sc.Contains(Schema1), true, "Contains");
CError.Compare(sc.IsCompiled, false, "IsCompiled");
sc.Compile();
CError.Compare(sc.IsCompiled, true, "IsCompiled");
CError.Compare(Schema1.IsCompiled, true, "IsCompiled on SOM");
}
catch (XmlSchemaException e)
{
_output.WriteLine(e.ToString());
return;
}
Assert.True(false);
}