private Validator PerformAssertion(string file, bool expected) { FileStream input = File.Open(file, FileMode.Open, FileAccess.Read); try { Validator validator = new Validator(new XmlInput(new StreamReader(input), ".\\..\\..\\")); Assert.Equal(expected, validator.IsValid); return validator; } finally { input.Close(); } }
public static void AssertXmlValid(Validator validator) { True(validator.IsValid, validator.ValidationMessage); }
public static void AssertXmlValid(XmlInput xmlInput) { Validator validator = new Validator(xmlInput); AssertXmlValid(validator); }