From 41bb8beb82dcaea97596447c168fb5aaa94cbefd Mon Sep 17 00:00:00 2001 From: Patrick Lioi Date: Sat, 20 Jun 2020 16:21:59 -0500 Subject: [PATCH] Improve ShouldBe() type assertion by having it throw MatchException. --- src/Fixie.Tests/Assertions/AssertionExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fixie.Tests/Assertions/AssertionExtensions.cs b/src/Fixie.Tests/Assertions/AssertionExtensions.cs index 52329ab3c..0f60dd0ec 100644 --- a/src/Fixie.Tests/Assertions/AssertionExtensions.cs +++ b/src/Fixie.Tests/Assertions/AssertionExtensions.cs @@ -62,7 +62,7 @@ public static T ShouldBe(this object? actual) if (actual is T typed) return typed; - throw new AssertException(typeof(T), actual?.GetType()); + throw new MatchException(typeof(T).ToString(), actual?.GetType().ToString()); } public static void ShouldBeEmpty(this IEnumerable collection)