public void testUnion(string s, string[] types)
{
Schema sc = Schema.Parse(s);
Assert.AreEqual(Schema.Type.UNION, sc.type);
UnionSchema us = sc as UnionSchema;
Assert.AreEqual(types.Length, us.schemas.Count);
int i = 0;
foreach (Schema sch in us.schemas)
{
Assert.AreEqual(types[i++], sch.GetName());
}
}