Exemplo n.º 1
0
        public bool Validate(string document, out List <string> validationMessages)
        {
            var validationRunner = new XmlValidationRunner(_schemaSet);
            var result           = validationRunner.Validate(document, GetType().GUID);

            validationMessages = validationRunner.ValidationMessages;
            return(result);
        }
Exemplo n.º 2
0
        public bool Validate(string document, out string validationMessage)
        {
            var validationRunner = new XmlValidationRunner(_schemaSet);
            var status           = validationRunner.Validate(document, GetType().GUID);

            validationMessage = validationRunner.ValidationMessages.ToString();
            return(status);
        }
Exemplo n.º 3
0
            public void SimpleInitialization()
            {
                //Arrange
                var xmlSchemaSet = TestGenerator.XmlSchemaSet();

                //Act
                var validationRunner = new XmlValidationRunner(xmlSchemaSet);

                //Assert
                Assert.Equal(xmlSchemaSet, validationRunner.XmlSchemaSet);
            }
Exemplo n.º 4
0
            public void AddsValidationMessage()
            {
                //Arrange
                var validationRunner  = new XmlValidationRunner(TestGenerator.XmlSchemaSet());
                var invalidTestCouple = new TestGenerator.InvalidContentTestCouple();

                //Act
                validationRunner.Validate(invalidTestCouple.Input());

                //Assert
                Assert.Equal(1, validationRunner.ValidationMessages.Count);
            }