public static void ShouldMatch <T>(this ExpectedObject expected, T actual) { IWriter writer = new ShouldWriter(); if (!expected.Equals(actual, writer, true)) { var results = writer.GetFormattedResults(); throw new ComparisonException(results); } }
public static void ShouldEqual <T>(this ExpectedObject expected, T actual) { IWriter writer = new ShouldWriter(); if (!expected.Equals(actual, writer)) { var results = writer.GetFormattedResults(); if (!string.IsNullOrEmpty(results)) { throw new ComparisonException(results); } } }