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

Allows BeEquivalentTo to handle a non-generic collection as the SUT #975

Merged
merged 1 commit into from Nov 19, 2018

Conversation

dennisdoomen
Copy link
Member

@dennisdoomen dennisdoomen commented Nov 18, 2018

The GenericEnumerableEquivalencyStep did not properly support the subject to be a non-generic collection.

Fixes #973

@dennisdoomen dennisdoomen requested a review from jnyrup Nov 18, 2018
jnyrup
jnyrup approved these changes Nov 19, 2018
@@ -1598,30 +1616,6 @@ public void When_subject_is_null_and_expectation_is_enumerable_it_should_throw()
"Expected subject not to be <null>*");
}

[Fact]
public void When_the_expectation_is_not_a_multi_dimensional_array_it_should_throw()
Copy link
Member

@jnyrup jnyrup Nov 19, 2018

Choose a reason for hiding this comment

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

Why is this test no longer valid?

Copy link
Member Author

@dennisdoomen dennisdoomen Nov 19, 2018

Choose a reason for hiding this comment

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

Because since v5, the expectation drives the type of comparison. Since it's a string, it'll never trigger the MultiDimensionalArrayEquivalencyStep

Copy link
Member

@jnyrup jnyrup Nov 19, 2018

Choose a reason for hiding this comment

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

Makes sense.
Couldn't see how that test should be affected by the other changes in this PR.

Copy link
Member Author

@dennisdoomen dennisdoomen Nov 19, 2018

Choose a reason for hiding this comment

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

Don't even understand how this entire bug only surfaced now.

@dennisdoomen dennisdoomen merged commit d25c795 into fluentassertions:master Nov 19, 2018
1 check passed
@dennisdoomen dennisdoomen deleted the fix973 branch Nov 19, 2018
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.

None yet

2 participants