public void Validate(bool expectedEquivalence) { ValidationResult validationResult = Validate(); if (expectedEquivalence && validationResult != null) { assertion.FailWith(validationResult.FormatString, validationResult.FormatParams); } if (!expectedEquivalence && validationResult is null) { assertion.FailWith("Did not expect Xml to be equivalent{reason}, but it is."); } }
private bool ValidateAgainstNulls() { if ((expected is null) ^ (subject is null)) { assertion.FailWith(ExpectationDescription + "{0}{reason}, but found {1}.", expected, subject); return(false); } return(true); }