[API Suggestion]: Set functionality for DataRowCollections
See original GitHub issueThe 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 use IEnumerable<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.
public static class DataRowCollectionAssertionExtensions
{
public static AndConstraint<GenericCollectionAssertions<DataRow>> BeSubsetOf(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> expectedSuperset, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> BeSubsetOf(this GenericCollectionAssertions<DataRow> assertion, DataRowCollection expectedSuperset, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> BeSubsetOf(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> expectedSuperset, Func<EquivalencyAssertionOptions<DataRow>, EquivalencyAssertionOptions<DataRow>> config, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> IntersectWith(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> otherRows, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> IntersectWith(this GenericCollectionAssertions<DataRow> assertion, DataRowCollection otherCollection, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> IntersectWith(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> otherRows, Func<EquivalencyAssertionOptions<DataRow>, EquivalencyAssertionOptions<DataRow>> config, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> NotBeSubsetOf(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> unexpectedSuperset, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> NotBeSubsetOf(this GenericCollectionAssertions<DataRow> assertion, DataRowCollection unexpectedSuperset, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> NotBeSubsetOf(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> unexpectedSuperset, Func<EquivalencyAssertionOptions<DataRow>, EquivalencyAssertionOptions<DataRow>> config, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> NotIntersectWith(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> otherRows, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> NotIntersectWith(this GenericCollectionAssertions<DataRow> assertion, DataRowCollection otherCollection, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataRow>> NotIntersectWith(this GenericCollectionAssertions<DataRow> assertion, IEnumerable<DataRow> otherRows, Func<EquivalencyAssertionOptions<DataRow>, EquivalencyAssertionOptions<DataRow>> config, string because = "", params object[] becauseArgs) { }
}
Issue Analytics
- State:
- Created a year ago
- Comments:15 (15 by maintainers)
Top GitHub Comments
I guess that’s the answer? Just make my own copy of the basic
ObjectInfo
implementation.Oh, problem though –
IObjectInfo
implementations areinternal
. Not exactly sure how to use it either, but them beinginternal
is the bigger problem. Or do I just have to make my own implementation??