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 EqualByValues<T> little class #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

add EqualByValues<T> little class #3

wants to merge 5 commits into from

Conversation

andriyshevchenko
Copy link

@andriyshevchenko andriyshevchenko commented Dec 14, 2017

I've added a EqualByValues<T> class, which determines whether two (any-size) sequences have equal members, and the order of elements doesn't matter.
I've also added some test, but unfortunately unable to run them. I've tested with MsTest.

@andriyshevchenko
Copy link
Author

For example, gives True:

var coll1 = new string[] { "Hello", "Apple", "C#", "Java" };
var coll2 = new string[] { "C#", "Hello", "Apple" };
Assert.IsTrue(new EqualByValues<string>(coll1, coll2).Value());

and gives False:

var coll1 = new string[] { "Hello", "Apple", "C#", "Java" };
var coll2 = new string[] { "C#", "Hello", "Apple", "Lisp" };
Assert.IsTrue(new EqualByValues<string>(coll1, coll2).Value());

@andriyshevchenko
Copy link
Author

Sorry, i'm unable to determine why it doesn't build, my Ide builds it successfully

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.

1 participant