Skip to content

Commit

Permalink
Qodana scan: Potentially misleading parameter name in lambda or local…
Browse files Browse the repository at this point in the history
… function
  • Loading branch information
IT-VBFK authored and dennisdoomen committed Aug 23, 2023
1 parent ca6dcbf commit 1ab324b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Tests/FluentAssertions.Equivalency.Specs/SelectionRulesSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public void When_including_fields_it_should_succeed_if_just_the_included_field_m
// Act
Action act =
() =>
class1.Should().BeEquivalentTo(class2, opts => opts.Including(_ => _.Field1).Including(_ => _.Field2));
class1.Should().BeEquivalentTo(class2, opts => opts.Including(o => o.Field1).Including(o => o.Field2));

// Assert
act.Should().NotThrow("the only selected fields have the same value");
Expand Down Expand Up @@ -518,7 +518,7 @@ public void When_including_fields_it_should_fail_if_any_included_field_do_not_ma
Action act =
() =>
class1.Should().BeEquivalentTo(class2,
opts => opts.Including(_ => _.Field1).Including(_ => _.Field2).Including(_ => _.Field3));
opts => opts.Including(o => o.Field1).Including(o => o.Field2).Including(o => o.Field3));

// Assert
act.Should().Throw<XunitException>().WithMessage("Expected field class1.Field3*");
Expand Down Expand Up @@ -669,7 +669,7 @@ public void When_excluding_members_it_should_pass_if_only_the_excluded_members_a
Action act =
() =>
class1.Should().BeEquivalentTo(class2,
opts => opts.Excluding(_ => _.Field3).Excluding(_ => _.Property1));
opts => opts.Excluding(o => o.Field3).Excluding(o => o.Property1));

// Assert
act.Should().NotThrow("the non-excluded fields have the same value");
Expand All @@ -696,7 +696,7 @@ public void When_excluding_members_it_should_fail_if_any_non_excluded_members_ar

// Act
Action act =
() => class1.Should().BeEquivalentTo(class2, opts => opts.Excluding(_ => _.Property1));
() => class1.Should().BeEquivalentTo(class2, opts => opts.Excluding(o => o.Property1));

// Assert
act.Should().Throw<XunitException>().WithMessage("Expected*Field3*");
Expand Down Expand Up @@ -1476,7 +1476,7 @@ public void Run_type_typing_ignores_hidden_properties_even_when_using_a_referenc
expectation.Property = "ExpectedBaseValue";

// Act / Assert
subject.Should().BeEquivalentTo(expectation, _ => _.RespectingRuntimeTypes());
subject.Should().BeEquivalentTo(expectation, o => o.RespectingRuntimeTypes());
}

[Fact]
Expand All @@ -1498,8 +1498,8 @@ public void Including_the_derived_property_excludes_the_hidden_property()
((AnotherBaseWithProperty)expectation).Property = "ExpectedBaseValue";

// Act / Assert
subject.Should().BeEquivalentTo(expectation, _ => _
.Including(_ => _.Property));
subject.Should().BeEquivalentTo(expectation, opt => opt
.Including(o => o.Property));
}

[Fact]
Expand All @@ -1515,7 +1515,7 @@ public void Excluding_the_property_hiding_the_base_class_one_does_not_reveal_the
((AnotherBaseWithProperty)expectation).Property = "ExpectedBaseValue";

// Act
Action act = () => subject.Should().BeEquivalentTo(expectation, _ => _
Action act = () => subject.Should().BeEquivalentTo(expectation, o => o
.Excluding(b => b.Property));

// Assert
Expand Down Expand Up @@ -1646,7 +1646,7 @@ public void Including_the_derived_field_excludes_the_hidden_field()
// Act / Assert
subject.Should().BeEquivalentTo(expectation, options => options
.IncludingFields()
.Including(_ => _.Field));
.Including(o => o.Field));
}

[Fact]
Expand Down

0 comments on commit 1ab324b

Please sign in to comment.