示例#1
0
 public void AddCell_Should_ThrowNullReferenceException_When_CollectionOfCellsWasNotInitialized()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         var tableData = new TableData();
         tableData.AddCell("", TableCellType.None, null);
     });
 }
示例#2
0
        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);
            });
        }
示例#3
0
        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);
        }
示例#4
0
 protected void AddItemData(string id, TableCellType type, ICollection <string> refs)
 {
     _tableData.AddCell(id, type, refs);
 }