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

Add collection assertion ContainEquivalentOf #950

Merged
merged 7 commits into from Dec 15, 2018

Conversation

@matthiaslischka
Copy link
Contributor

matthiaslischka commented Oct 18, 2018

I gave #584 a try.
A new collection assertion named ContainEquivalentTo so a collection can be asserted to contain an object that "IsEquivalentTo" an expected object.
Not sure about the documentation. Could be enough, but not sure.

BR Matthias

@matthiaslischka matthiaslischka force-pushed the matthiaslischka:master branch 2 times, most recently from 50f3573 to c8dd3a0 Oct 18, 2018
asserts that a collection contains at least one object that is equivalent to the expected object.
@matthiaslischka matthiaslischka force-pushed the matthiaslischka:master branch from c8dd3a0 to 5b27bc7 Oct 18, 2018
@dennisdoomen dennisdoomen changed the title add collection assertion ContainEquivalentTo Add collection assertion ContainEquivalentTo Oct 20, 2018
@dennisdoomen dennisdoomen added this to the 5.5.0 milestone Oct 20, 2018
@matthiaslischka matthiaslischka force-pushed the matthiaslischka:master branch from 39666a3 to 5426a12 Oct 20, 2018
@matthiaslischka matthiaslischka changed the title Add collection assertion ContainEquivalentTo Add collection assertion ContainEquivalentOf Oct 20, 2018
docs/_pages/documentation.md Outdated Show resolved Hide resolved
@matthiaslischka matthiaslischka force-pushed the matthiaslischka:master branch from 48712d1 to 83053a3 Oct 21, 2018
@jnyrup jnyrup removed this from the 5.5.0 milestone Nov 8, 2018
@dennisdoomen dennisdoomen self-assigned this Nov 29, 2018
@dennisdoomen

This comment has been minimized.

Copy link
Member

dennisdoomen commented Nov 30, 2018

Just two typos. The rest looks good.

@jnyrup

This comment has been minimized.

Copy link
Collaborator

jnyrup commented Dec 5, 2018

Should this be added to GenericDictionaryAssertions.cs as well?

@dennisdoomen

This comment has been minimized.

Copy link
Member

dennisdoomen commented Dec 6, 2018

Should this be added to GenericDictionaryAssertions.cs as well?

To verify that a dictionary contains a key-value pair which value is equivalent to the provided expectation? Maybe, but I don't think it belongs in this PR. It's not a consistency thing IMO.

@jnyrup

This comment has been minimized.

Copy link
Collaborator

jnyrup commented Dec 6, 2018

Ahh, yes of course.
I just searched for assertion classes exposing BeEquivalentTo, for consistency matters.

If one wants to assert that a dictionary contains an equivalent value, one can use

dictionary.Values.Should().ContainEquivalentOf(expected);
@dennisdoomen

This comment has been minimized.

Copy link
Member

dennisdoomen commented Dec 6, 2018

So it seems we can merge this one.

@jnyrup

This comment has been minimized.

Copy link
Collaborator

jnyrup commented Dec 6, 2018

I agree. I haven't been able to come up with a reason not to merge it.

@dennisdoomen dennisdoomen merged commit 0702ef4 into fluentassertions:master Dec 15, 2018
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@matthiaslischka

This comment has been minimized.

Copy link
Contributor Author

matthiaslischka commented Dec 15, 2018

Hi, i just wanted to thank the two of you for your support with this PR. Especially @dennisdoomen, you made me realize just how much work maintaining an open source project is as you could have done this by yourself in no time but took the effort to support me in my doing. Thanks.

@dennisdoomen

This comment has been minimized.

Copy link
Member

dennisdoomen commented Dec 15, 2018

Thanks for the kind words.

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.