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

v103() private method

private v103 ( object param0 ) : void
param0 object
return void
        public void v103(object param0)
        {
            bool addset = (bool)param0;

            Initialize();
            XmlSchemaSet ss1 = new XmlSchemaSet();
            ss1.XmlResolver = new XmlUrlResolver();
            ss1.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);
            ss1.Add(null, Path.Combine(TestData._Root, "Misc103_x.xsd"));
            ss1.Compile();

            CError.Compare(ss1.Count, 1, "Schema Set 1 Count mismatch!");

            XmlSchemaSet ss2 = new XmlSchemaSet();
            ss2.XmlResolver = new XmlUrlResolver();
            ss2.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);
            XmlSchema s = ss2.Add(null, Path.Combine(TestData._Root, "Misc103_a.xsd"));
            ss2.Compile();

            CError.Compare(ss1.Count, 1, "Schema Set 1 Count mismatch!");

            if (addset)
            {
                ss1.Add(ss2);

                CError.Compare(ss1.GlobalElements.Count, 7, "Schema Set 1 GlobalElements Count mismatch!");
                CError.Compare(ss1.GlobalAttributes.Count, 2, "Schema Set 1 GlobalAttributes Count mismatch!");
                CError.Compare(ss1.GlobalTypes.Count, 6, "Schema Set 1 GlobalTypes Count mismatch!");
            }
            else
            {
                ss1.Add(s);

                CError.Compare(ss1.GlobalElements.Count, 2, "Schema Set 1 GlobalElements Count mismatch!");
                CError.Compare(ss1.GlobalAttributes.Count, 0, "Schema Set 1 GlobalAttributes Count mismatch!");
                CError.Compare(ss1.GlobalTypes.Count, 2, "Schema Set 1 GlobalTypes Count mismatch!");
            }

            /***********************************************/

            XmlSchemaSet ss3 = new XmlSchemaSet();
            ss3.XmlResolver = new XmlUrlResolver();
            ss3.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);
            ss3.Add(null, Path.Combine(TestData._Root, "Misc103_c.xsd"));
            ss3.Compile();
            ss1.Add(ss3);

            CError.Compare(ss1.GlobalElements.Count, 8, "Schema Set 1 GlobalElements Count mismatch!");

            return;
        }