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

Custom rules were not executed on dictionary equivalency assertions #886

Merged

Conversation

dennisdoomen
Copy link
Member

@dennisdoomen dennisdoomen commented Aug 7, 2018

Fixes #530

@@ -1085,6 +1085,7 @@ public void When_a_property_is_write_only_it_should_be_ignored()
action.Should().NotThrow();
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave this change out.

@@ -6,6 +6,7 @@
using System.Linq;
using FluentAssertions.Common;
using FluentAssertions.Equivalency;
using FluentAssertions.Execution;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this change can be left out as well?

@@ -1221,5 +1221,37 @@ public void When_a_nested_dictionary_value_doesnt_match_it_should_throw()
act.Should().Throw<XunitException>()
.WithMessage("Expected*String*JValue*");
}

[Fact]
public void SomeOtherTest()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a better test name.

//-----------------------------------------------------------------------------------------------------------
var dictOne = new Dictionary<string, double>
{
{ "a", 1.2345 },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nitpicking, but I would use C# 6 dictionary initializers.

@@ -553,7 +553,7 @@ public void When_an_assertion_rule_is_added_it_appear_in_the_exception_message()
}

[Fact]
public void When_multiple_asertion_rules_are_added_they_should_be_evaluated_last_to_first()
public void When_multiple_assertion_rules_are_added_they_should_be_evaluated_last_to_first()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on how strict/isolated you want to be on commits, this should be moved to it's own commit.

@dennisdoomen dennisdoomen merged commit de6787b into fluentassertions:master Aug 9, 2018
@dennisdoomen dennisdoomen deleted the CustomAssertionRul branch August 9, 2018 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants