private HtmlCompareResult(bool matches = false, string expected = null, string actual = null, HtmlCompareMismatchReason reason = HtmlCompareMismatchReason.Default) { Matches = matches; Expected = expected; Actual = actual; Reason = reason; }
private static void AssertMismatch(HtmlCompareResult result, string expected = null, string actual = null, HtmlCompareMismatchReason reason = HtmlCompareMismatchReason.Default) { Assert.False(result.Matches, "Expected a mismatch, but was a match."); var expectedResult = HtmlCompareResult.Mismatch(expected, actual, reason); Assert.Equal(expectedResult, result); }
/// <summary> /// Gets a <see cref="HtmlCompareResult"/> representing a mismatch. /// </summary> /// <param name="expected">The HTML that was expected in the comparison.</param> /// <param name="actual">The actual HTML that was found.</param> /// <param name="reason">The reason for the mismatch.</param> public static HtmlCompareResult Mismatch(string expected = null, string actual = null, HtmlCompareMismatchReason reason = HtmlCompareMismatchReason.Default) => new HtmlCompareResult(false, expected, actual, reason);