diff --git a/Tests/FluentAssertions.Specs/Exceptions/InvokingActionSpecs.cs b/Tests/FluentAssertions.Specs/Exceptions/InvokingActionSpecs.cs index 256205fd28..fc28fc2b1c 100644 --- a/Tests/FluentAssertions.Specs/Exceptions/InvokingActionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Exceptions/InvokingActionSpecs.cs @@ -6,7 +6,7 @@ namespace FluentAssertions.Specs.Exceptions public class InvokingActionSpecs { [Fact] - public void When_invoking_an_action_on_a_null_subject_it_should_throw() + public void Invoking_on_null_is_not_allowed() { // Arrange Does someClass = null; @@ -20,13 +20,13 @@ public void When_invoking_an_action_on_a_null_subject_it_should_throw() } [Fact] - public void When_invoking_an_action_with_null_it_should_throw() + public void Invoking_with_null_is_not_allowed() { // Arrange Does someClass = Does.NotThrow(); // Act - Action act = () => someClass.Invoking(null).Should().NotThrow(); + Action act = () => someClass.Invoking(null); // Assert act.Should().ThrowExactly() diff --git a/Tests/FluentAssertions.Specs/Exceptions/InvokingFunctionSpecs.cs b/Tests/FluentAssertions.Specs/Exceptions/InvokingFunctionSpecs.cs index 1a97c41883..f1750ff015 100644 --- a/Tests/FluentAssertions.Specs/Exceptions/InvokingFunctionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Exceptions/InvokingFunctionSpecs.cs @@ -6,13 +6,13 @@ namespace FluentAssertions.Specs.Exceptions public class InvokingFunctionSpecs { [Fact] - public void When_invoking_a_function_on_a_null_subject_it_should_throw() + public void Invoking_on_null_is_not_allowed() { // Arrange Does someClass = null; // Act - Action act = () => someClass.Invoking(d => d.ToString()); + Action act = () => someClass.Invoking(d => d.Return()); // Assert act.Should().ThrowExactly() @@ -20,13 +20,13 @@ public void When_invoking_a_function_on_a_null_subject_it_should_throw() } [Fact] - public void When_invoking_a_function_with_null_it_should_throw() + public void Invoking_with_null_is_not_allowed() { // Arrange - object someClass = new(); + Does someClass = Does.NotThrow(); // Act - Action act = () => someClass.Invoking((Func)null); + Action act = () => someClass.Invoking((Func)null); // Assert act.Should().ThrowExactly()