diff --git a/src/Fixie.Tests/Assertions/AssertionExtensions.cs b/src/Fixie.Tests/Assertions/AssertionExtensions.cs index cf91682d6..831b6eeda 100644 --- a/src/Fixie.Tests/Assertions/AssertionExtensions.cs +++ b/src/Fixie.Tests/Assertions/AssertionExtensions.cs @@ -68,8 +68,7 @@ public static T ShouldBe(this object? actual) public static void ShouldBeEmpty(this IEnumerable collection) { - if (collection.Any()) - throw new AssertException("Collection was not empty."); + collection.ShouldMatch(Array.Empty()); } public static TException ShouldThrow(this Action shouldThrow, string expectedMessage) where TException : Exception