-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
[API Suggestion]: Set functionality for DataRowCollections #1896
Comments
Support for set operations on |
So in your mind, this is not logically the same thing as |
I get that because |
If somebody works a lot with |
@logiclrd For my understanding, is this proposal something you would find useful, as in actually use it, or is it more of hypothetical usefulness? |
I don't currently have any tests that would use this functionality -- though that is at least partly because I didn't have a way to write such tests. There is something of a chicken-and-egg problem, it seems to me -- if the functionality is there then it has some likeliness of being consumed, but if it's not there, then it isn't terribly likely that people will write code to do the comparison by hand. |
So unless anybody really needs this (and is willing to build it), I don't think I want to invest time in it. What do you think @jnyrup |
Okay -- since this consists entirely of extension methods, it seems eminently possible to put these into their own package off the main FluentAssertions source code. So, I could transplant these into a |
I don't think this should be part of the core library. FYI, you might run into problems similar to #1486. |
Mm, interesting -- that's only a problem when elements in one set can be equivalent to more than one element in the other set in different ways, if I'm understanding correctly? |
The current prototype implementation of the |
Correct.
Have a look at |
Ah, okay, and I can access that through the |
Oh, problem though -- |
I guess that's the answer? Just make my own copy of the basic |
The generic collection assertions include set functionality:
BeSubsetOf
/NotBeSubsetOf
IntersectWith
/NotIntersectWith
This functionality used to be available for assertions on
DataRowCollection
objects, before support for non-generic collection assertions was removed. This removal unintentionally eliminated assertions on System.Data collections completely, as it was implemented implicitly via the collections'IEnumerable
support. System.Data precedes generics in the language, and has never been updated to useIEnumerable<T>
. Recently, in #1812, the ability to do these assertions on System.Data collections was reinstated, but the set support was set off for separate implementation.A PR has been created that adds the set support for
DataRowCollection
as well: #1894. It has been requested that an issue be created to discuss these API changes independent of the implementation, and that's what this is.The text was updated successfully, but these errors were encountered: