public void AddCell_Should_ThrowNullReferenceException_When_CollectionOfCellsWasNotInitialized() { Assert.Throws <ArgumentNullException>(() => { var tableData = new TableData(); tableData.AddCell("", TableCellType.None, null); }); }
public void AddCell_Should_ThrowArgumentNullException_When_PassingNullAsReferences() { Assert.Throws <ArgumentNullException>(() => { var tableData = new TableData(); _cells.SetValue(tableData, new List <TableCell>()); tableData.AddCell("", TableCellType.None, null); }); }
public void AddCell_Should_IncreaseCellCountByOne_When_PassingOneReference() { var tableData = new TableData(); _cells.SetValue(tableData, new List <TableCell>()); tableData.AddCell("", TableCellType.None, new string[0]); var actual = _cells.GetValue(tableData) as List <TableCell>; Assert.AreEqual(1, actual.Count); }
protected void AddItemData(string id, TableCellType type, ICollection <string> refs) { _tableData.AddCell(id, type, refs); }