System.Xml.Tests.TCXmlSchemaValidatorMisc.WhitespaceCollapseFacetNotDealtWithCorrectly C# (CSharp) Méthode

WhitespaceCollapseFacetNotDealtWithCorrectly() private méthode

private WhitespaceCollapseFacetNotDealtWithCorrectly ( ) : void
Résultat void
        public void WhitespaceCollapseFacetNotDealtWithCorrectly()
        {
            Initialize();

            XmlSchemaSet ss = new XmlSchemaSet();
            XmlSchema Schema = XmlSchema.Read(XmlReader.Create(new StringReader(xsd661328)), ValidationCallback);
            ss.Add(Schema);
            ss.Compile();

            XmlReaderSettings rs = new XmlReaderSettings();
            rs.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);
            rs.ValidationType = ValidationType.Schema;
            rs.Schemas.Add(null, XmlReader.Create(new StringReader(xsd661328)));

            using (XmlReader r = XmlReader.Create(new StringReader(xml661328), rs))
            {
                while (r.Read()) ;
            }

            Assert.Equal(warningCount, 0);
            Assert.Equal(errorCount, 2);
            return;
        }