Avro.Test.TestSchema.testUnion C# (CSharp) Method

testUnion() private method

private testUnion ( string s, string types ) : void
s string
types string
return void
        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());
            }
        }