* add AssertExtensions.Eqal(string, string) that logs entire content if provided strings are not equal
* log entire content to see which assertion fails
throw new XunitException($"Expected: {expected1} || {expected2}{Environment.NewLine}Actual: {value}");
}
+ /// <summary>
+ /// Compares two strings, logs entire content if they are not equal.
+ /// </summary>
+ public static void Equal(string expected, string actual)
+ {
+ if (!expected.Equals(actual))
+ {
+ throw new AssertActualExpectedException(expected, actual, "Provided strings were not equal!");
+ }
+ }
+
public delegate void AssertThrowsActionReadOnly<T>(ReadOnlySpan<T> span);
public delegate void AssertThrowsAction<T>(Span<T> span);
p.WaitForExit(); // This ensures async event handlers are finished processing.
const string Expected = RemotelyInvokable.TestConsoleApp + " started error stream" + RemotelyInvokable.TestConsoleApp + " closed error stream";
- Assert.Equal(Expected, sb.ToString());
+ AssertExtensions.Equal(Expected, sb.ToString());
Assert.Equal(invokeRequired ? 3 : 0, invokeCalled);
}