public void EmptyDataTest() { EditColumnMetadata[] metas = new EditColumnMetadata[0]; DbColumnWrapper[] cols = new DbColumnWrapper[0]; EditColumnMetadata[] filteredData = EditTableMetadata.FilterColumnMetadata(metas, cols); ValidateFilteredData(filteredData, cols); }
public void LessResultColumnsTest() { EditColumnMetadata[] metas = CreateMetadataColumns(new string[] { "[col1]", "[col2]", "[col3]", "[fillerCol1]", "[fillerCol2]" }); DbColumnWrapper[] cols = CreateColumnWrappers(new string[] { metas[0].EscapedName, metas[1].EscapedName, metas[2].EscapedName }); EditColumnMetadata[] filteredData = EditTableMetadata.FilterColumnMetadata(metas, cols); ValidateFilteredData(filteredData, cols); }
/// <summary> /// Base constructor for a row edit. Stores the state that should be available to all row /// edit implementations. /// </summary> /// <param name="rowId">The internal ID of the row that is being edited</param> /// <param name="associatedResultSet">The result set that will be updated</param> /// <param name="associatedMetadata">Metadata provider for the object to edit</param> protected RowEditBase(long rowId, ResultSet associatedResultSet, EditTableMetadata associatedMetadata) { if (!associatedMetadata.HasExtendedProperties) { throw new ArgumentException(SR.EditDataMetadataNotExtended); } RowId = rowId; AssociatedObjectMetadata = associatedMetadata; AssociatedResultSet = associatedResultSet; AssociatedObjectMetadata.Columns = EditTableMetadata.FilterColumnMetadata(AssociatedObjectMetadata.Columns, AssociatedResultSet.Columns); }