-
Notifications
You must be signed in to change notification settings - Fork 732
[API Suggestion]: DataTableCollection and DataColumnCollection ContainItemWithName #1897
Copy link
Copy link
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementation
Description
The DataTableCollection and DataColumnCollection types in System.Data have items with logical names. An API enhancement is proposed to allow succinct expression of assertions that these collections contain items with provided names. This functionality was originally implemented within pull request #1812, but has been separated off for independent consideration in pull request #1893.
Specific API surface changes proposed:
public static class DataTableCollectionAssertionExtensions
{
public static AndConstraint<GenericCollectionAssertions<DataTable>> ContainTableWithName(this GenericCollectionAssertions<DataTable> assertion, string expectedTableName, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataTable>> NotContainTableWithName(this GenericCollectionAssertions<DataTable> assertion, string unexpectedTableName, string because = "", params object[] becauseArgs) { }
}
public static class DataColumnCollectionAssertionExtensions
{
public static AndConstraint<GenericCollectionAssertions<DataColumn>> ContainColumnWithName(this GenericCollectionAssertions<DataColumn> assertion, string expectedColumnName, string because = "", params object[] becauseArgs) { }
public static AndConstraint<GenericCollectionAssertions<DataColumn>> NotContainColumnWithName(this GenericCollectionAssertions<DataColumn> assertion, string unexpectedColumnName, string because = "", params object[] becauseArgs) { }
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementation