System.Xml.Tests.TC_SchemaSet_Misc.v10 C# (CSharp) Method

v10() private method

private v10 ( object param0, object param1, object param2 ) : void
param0 object
param1 object
param2 object
return void
        public void v10(object param0, object param1, object param2)
        {
            string xmlFile = param0.ToString();
            int count = (int)param1;
            bool custom = (bool)param2;
            string attName = "blah";

            XmlSchemaSet ss = new XmlSchemaSet();
            ss.XmlResolver = new XmlUrlResolver();
            ss.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);
            ss.Add(null, Path.Combine(TestData._Root, xmlFile));
            ss.Compile();

            //test the count
            CError.Compare(ss.Count, count, "Count of SchemaSet not matched!");

            //make sure the correct schema is in the set
            if (custom)
            {
                foreach (XmlSchemaAttribute a in ss.GlobalAttributes.Values)
                {
                    if (a.QualifiedName.Name == attName)
                        return;
                }
                Assert.True(false);
            }
            return;
        }