예제 #1
0
 /// <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();
     }
 }
예제 #2
0
        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);
        }