public void AssertHasValue_WithDataRowNull() { //Arrange DataRow dataRow = null; string columnName = "Column1"; string rowIdentifier = Guid.NewGuid().ToString(); // Action DataRowExtensions.AssertHasValue <string>(dataRow, columnName, rowIdentifier); }
public void AssertHasValue_WithColumnNameStringEmpty() { //Arrange var dataTable = new DataTable(); string columnName = string.Empty; var dataColumn = new DataColumn(columnName); dataTable.Columns.Add(dataColumn); var dataRow = dataTable.NewRow(); // Action DataRowExtensions.AssertHasValue <string>(dataRow, columnName); }
public void AssertHasValue_WithValue() { //Arrange var dataTable = new DataTable(); string columnName = "Column1"; var dataColumn = new DataColumn(columnName); dataTable.Columns.Add(dataColumn); var dataRow = dataTable.NewRow(); dataRow[dataColumn] = Guid.NewGuid().ToString(); // Action DataRowExtensions.AssertHasValue(dataRow, columnName); }
public void AssertHasValue_WithNullValue() { //Arrange var dataTable = new DataTable(); string columnName = "Column1"; var dataColumn = new DataColumn(columnName); dataTable.Columns.Add(dataColumn); var dataRow = dataTable.NewRow(); dataRow[dataColumn] = null; // Action DataRowExtensions.AssertHasValue <string>(dataRow, columnName); }
public void AssertHasValue_WithNonMatchingTypeValue() { //Arrange var dataTable = new DataTable(); string columnName = "Column1"; var dataColumn = new DataColumn(columnName, typeof(Guid)); dataTable.Columns.Add(dataColumn); var dataRow = dataTable.NewRow(); dataRow[dataColumn] = Guid.NewGuid(); // Action DataRowExtensions.AssertHasValue <string>(dataRow, columnName); }