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

Improve enum comparison assert messages #923

Merged
merged 13 commits into from Sep 27, 2018

Conversation

@krajek
Copy link
Contributor

krajek commented Sep 24, 2018

Applies changes discussed in #897.

Example of the new message:
"Expected enum to be EnumFour.Three(3) by value, but found EnumOne.Two(3)

Reviews are welcome.

@krajek krajek changed the title [WIP] Improve enum comparison assert messages Improve enum comparison assert messages Sep 25, 2018
@krajek

This comment has been minimized.

Copy link
Contributor Author

krajek commented Sep 25, 2018

@jnyrup Thanks for the review. All suggestions are implemented and is my opinion PR is ready to go

@jnyrup
jnyrup approved these changes Sep 25, 2018
Src/FluentAssertions/Equivalency/EnumEqualityStep.cs Outdated Show resolved Hide resolved
Copy link
Member

dennisdoomen left a comment

Only minor comments. See the legend for the meaning of the emojis.

Src/FluentAssertions/Equivalency/EnumEqualityStep.cs Outdated Show resolved Hide resolved
Src/FluentAssertions/Equivalency/EnumEqualityStep.cs Outdated Show resolved Hide resolved
Src/FluentAssertions/Equivalency/EnumEqualityStep.cs Outdated Show resolved Hide resolved
Src/FluentAssertions/Equivalency/EnumEqualityStep.cs Outdated Show resolved Hide resolved
Src/FluentAssertions/Equivalency/EnumEqualityStep.cs Outdated Show resolved Hide resolved
@@ -3599,6 +3595,26 @@ public void When_asserting_members_from_different_enum_types_are_equivalent_by_s
act.Should().NotThrow();
}

[Fact]
public void When_asserting_members_from_different_enum_types_are_equivalent_by_value_but_comparing_by_name_it_should_throw()

This comment has been minimized.

Copy link
@dennisdoomen

dennisdoomen Sep 26, 2018

Member

🤔 What are asserting members?

This comment has been minimized.

Copy link
@krajek

krajek Sep 26, 2018

Author Contributor

Would you accept the change to "[...]asserting_that_members_from[...]"? BTW there are many places like this is this particular file and tens in other files :-).

Tests/Shared.Specs/EnumAssertionSpecs.cs Show resolved Hide resolved
@dennisdoomen dennisdoomen merged commit bbf703e into fluentassertions:master Sep 27, 2018
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@krajek krajek deleted the krajek:better_enum_comparing branch Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.