/// <summary> /// Removes the selected excel column from the excel column list /// </summary> public void RemoveFieldFromExcelColumns() { if (SelectedExcelColumn != null) { int columnNum = this.SelectedExcelColumn.ColumnNumber; ExcelColumns.Remove(ExcelColumns.Where(i => i.ColumnNumber == columnNum).Single()); RenumberExcelColumns(); } }
public void ShouldRemoveColumn() { ExcelColumns columns = new ExcelColumns(); ExcelColumn column = new ExcelColumn { ColumnName = "Test", ErrorMessage = "not" }; columns.Add(column); columns.Remove(column); Assert.True(columns.Count() == 0); }