System.Xml.Tests.TCConstructor.SetSchemaSetWithInvalidContent_TypeCollision C# (CSharp) Method

SetSchemaSetWithInvalidContent_TypeCollision() private method

private SetSchemaSetWithInvalidContent_TypeCollision ( ) : void
return void
        public void SetSchemaSetWithInvalidContent_TypeCollision()
        {
            XmlSchemaValidator val;
            XmlSchemaInfo info = new XmlSchemaInfo();

            XmlSchemaSet sch = new XmlSchemaSet();
            //sch.Add("", TestData + "Basic.xsd");
            sch.Add("", XmlReader.Create(new StringReader("<?xml version=\"1.0\" ?>\n" +
                                                          "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n" +
                                                          "    <xs:element name=\"root\" type=\"xs:int\" />\n" +
                                                          "</xs:schema>")));
            sch.Add("", XmlReader.Create(new StringReader("<?xml version=\"1.0\" ?>\n" +
                                                          "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n" +
                                                          "    <xs:element name=\"root\" type=\"xs:string\" />\n" +
                                                          "</xs:schema>")));

            try
            {
                val = new XmlSchemaValidator(new NameTable(), sch, new XmlNamespaceManager(new NameTable()), AllFlags);
            }
            catch (XmlSchemaValidationException)
            {
                return;
            }

            return;
        }