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); }
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); }
public void SimpleInitialization() { //Arrange var xmlSchemaSet = TestGenerator.XmlSchemaSet(); //Act var validationRunner = new XmlValidationRunner(xmlSchemaSet); //Assert Assert.Equal(xmlSchemaSet, validationRunner.XmlSchemaSet); }
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); }