Skip to content

Commit

Permalink
Improve ShouldBe<T>() type assertion by having it throw MatchException.
Browse files Browse the repository at this point in the history
  • Loading branch information
plioi committed Jun 20, 2020
1 parent fdb5d22 commit 41bb8be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fixie.Tests/Assertions/AssertionExtensions.cs
Expand Up @@ -62,7 +62,7 @@ public static T ShouldBe<T>(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<T>(this IEnumerable<T> collection)
Expand Down

0 comments on commit 41bb8be

Please sign in to comment.