Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninvoked actions in tests #1817

Merged
merged 2 commits into from Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Src/FluentAssertions/Execution/AssertionScope.cs
Expand Up @@ -401,7 +401,7 @@ public void Dispose()
}
else
{
IDictionary<string,object> reportable = contextData.GetReportable();
IDictionary<string, object> reportable = contextData.GetReportable();

if (tracing.Length > 0)
{
Expand Down
2 changes: 1 addition & 1 deletion Tests/FluentAssertions.Specs/AndWhichConstraintSpecs.cs
Expand Up @@ -16,7 +16,7 @@ public void When_many_objects_are_provided_accessing_which_should_throw_a_descri
// Act
Action act = () =>
{
var item = continuation.Which;
_ = continuation.Which;
};

// Assert
Expand Down
Expand Up @@ -1714,7 +1714,7 @@ public void When_collection_contains_multiple_matches_which_should_throw()
// Act
Action action = () =>
{
string item = collection.Should().ContainMatch("* failed").Which;
_ = collection.Should().ContainMatch("* failed").Which;
};

// Assert
Expand Down
4 changes: 2 additions & 2 deletions Tests/FluentAssertions.Specs/ConfigurationSpecs.cs
Expand Up @@ -19,10 +19,10 @@ public void When_concurrently_accessing_current_Configuration_no_exception_shoul
{
MaxDegreeOfParallelism = 8
},
_ =>
__ =>
{
Configuration.Current.ValueFormatterAssembly = string.Empty;
var mode = Configuration.Current.ValueFormatterDetectionMode;
_ = Configuration.Current.ValueFormatterDetectionMode;
}
);

Expand Down
Expand Up @@ -59,7 +59,6 @@ public void When_condition_contains_extension_method_then_extension_method_must_
public void When_condition_contains_linq_extension_method_then_extension_method_must_be_formatted()
{
// Arrange
var actual = new[] { 4 };
var allowed = new[] { 1, 2, 3 };

// Act
Expand Down
Expand Up @@ -3657,7 +3657,7 @@ public void When_an_upper_case_string_with_numbers_is_not_supposed_to_be_in_uppe
string actual = "a1";

// Act / Assert
Action act = () => actual.Should().NotBeUpperCased();
actual.Should().NotBeUpperCased();
}

[Fact]
Expand Down Expand Up @@ -3792,7 +3792,7 @@ public void When_a_lower_case_string_with_numbers_is_not_supposed_to_be_in_lower
string actual = "A1";

// Act / Assert
Action act = () => actual.Should().NotBeLowerCased();
actual.Should().NotBeLowerCased();
}

[Fact]
Expand Down
Expand Up @@ -332,7 +332,7 @@ public void When_selecting_methods_that_are_not_virtual_it_should_only_return_th
.And.NotContain(m => m.Name == "PublicVirtualVoidMethodWithAttribute")
.And.NotContain(m => m.Name == "ProtectedVirtualVoidMethodWithAttribute");
}

[Fact]
public void When_selecting_methods_that_are_static_it_should_only_return_the_applicable_methods()
{
Expand Down