public void InitializeWithTypeValidateSameType()
{
XmlSchemaValidator val;
XmlSchemaInfo info = new XmlSchemaInfo();
XmlSchemaSet schemas = new XmlSchemaSet();
schemas.Add("", Path.Combine(TestData, XSDFILE_PARTIAL_VALIDATION));
schemas.Compile();
val = CreateValidator(schemas);
val.Initialize(schemas.GlobalTypes[new XmlQualifiedName("PartialType")]);
val.ValidateElement("foo", "", info, "PartialType", null, null, null);
val.ValidateEndOfAttributes(null);
val.ValidateEndElement(info);
Assert.Equal(info.Validity, XmlSchemaValidity.Valid);
Assert.Equal(info.SchemaType.Name, "PartialType");
return;
}