System.Xml.Tests.TCInitialize.InitializeShouldNotResetInternalSchemaSet C# (CSharp) Méthode

InitializeShouldNotResetInternalSchemaSet() private méthode

private InitializeShouldNotResetInternalSchemaSet ( ) : void
Résultat void
        public void InitializeShouldNotResetInternalSchemaSet()
        {
            XmlSchemaValidator val = CreateValidator(new XmlSchemaSet());
            XmlSchemaInfo info = new XmlSchemaInfo();

            val.Initialize();

            val.AddSchema(XmlSchema.Read(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>")), null));

            val.EndValidation();
            val.Initialize();

            val.ValidateElement("root", "", info);

            Assert.True(info.SchemaElement != null);

            return;
        }