System.Xml.Tests.TC_SchemaSet_Misc.v20 C# (CSharp) Méthode

v20() private méthode

private v20 ( ) : void
Résultat void
        public void v20()
        {
            string xmlns = @"http://www.w3.org/XML/1998/namespace";
            string attName = "blah";

            XmlSchemaSet ss = new XmlSchemaSet();
            ss.XmlResolver = new XmlUrlResolver();
            ss.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);
            ss.Add(xmlns, Path.Combine(TestData._Root, "bug264908_v11.xsd"));
            ss.Compile();

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

            //make sure the correct schema is in the set

            foreach (XmlSchemaAttribute a in ss.GlobalAttributes.Values)
            {
                if (a.QualifiedName.Name == attName)
                    return;
            }
            Assert.True(false);
        }