Skip to content

Commit

Permalink
Add missing test for matching null with wildcard strin
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-VBFK committed Apr 15, 2022
1 parent db4562b commit 1ac65aa
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -81,6 +81,20 @@ public void When_a_string_is_matched_against_null_it_should_throw_with_a_clear_e
.WithParameterName("wildcardPattern");
}

[Fact]
public void Null_does_not_match_to_any_string()
{
// Arrange
string subject = null;

// Act
Action act = () => subject.Should().Match("*");

// Assert
act.Should().Throw<XunitException>()
.WithMessage("Expected subject to match *, but found <null>.");
}

[Fact]
public void When_a_string_is_matched_against_an_empty_string_it_should_throw_with_a_clear_explanation()
{
Expand Down

0 comments on commit 1ac65aa

Please sign in to comment.