private void CheckExpectedElements(XmlSchemaParticle[] result, XmlQualifiedName[] names)
{
int cntFound;
Assert.Equal(result.Length, names.Length);
foreach (XmlSchemaParticle res in result)
Assert.True(res is XmlSchemaElement);
foreach (XmlQualifiedName n in names)
{
cntFound = 0;
foreach (XmlSchemaParticle res in result)
{
if (n == (res as XmlSchemaElement).QualifiedName)
cntFound++;
}
Assert.True(cntFound != 0);
Assert.True(cntFound <= 1);
}
}
}