Skip to content

Commit

Permalink
Improve Invoking test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
eNeRGy164 committed Mar 7, 2022
1 parent 56ee97b commit 4025118
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,20 @@ public void When_invoking_a_function_on_a_null_subject_it_should_throw()
.WithParameterName("subject");
}

[Fact]
public void When_invoking_a_function_with_null_it_should_throw()
{
// Arrange
object someClass = new();

// Act
Action act = () => someClass.Invoking((Func<object, string>)null);

// Assert
act.Should().ThrowExactly<ArgumentNullException>()
.WithParameterName("action");
}

[Fact]
public void When_invoking_an_action_on_a_null_subject_it_should_throw()
{
Expand All @@ -911,7 +925,7 @@ public void When_invoking_an_action_on_a_null_subject_it_should_throw()
}

[Fact]
public void When_invoking_null_it_should_throw()
public void When_invoking_an_action_with_null_it_should_throw()
{
// Arrange
Does someClass = Does.NotThrow();
Expand Down

0 comments on commit 4025118

Please sign in to comment.