public void CanResizeColumnsUsingShorthand2() { ColumnContainer target = new ColumnContainer(new Column() { Size = ColumnSize.Size9 }); target.SetNumberOfColumns(5); Assert.AreEqual(5, target.Columns.Count, "Column Cound should be 5"); Assert.IsTrue(target.SetColumnSizes("4w,2w,1,1,1"), "Column set size should be true"); Assert.AreEqual(ColumnSize.Size4, target.Columns[0].Size, "First column number should be size 4"); Assert.IsTrue(target.Columns[0].NoGutter, "First Column should have no gutter turned on"); Assert.AreEqual(ColumnSize.Size2, target.Columns[1].Size, "Second column number should be size 2"); Assert.IsTrue(target.Columns[1].NoGutter, "Second Column should have no gutter turned on"); Assert.AreEqual(ColumnSize.Size1, target.Columns[2].Size, "Third column number should be size 1"); Assert.AreEqual(ColumnSize.Size1, target.Columns[3].Size, "Fourth column number should be size 1"); Assert.AreEqual(ColumnSize.Size1, target.Columns[4].Size, "Fifth column number should be size 1"); }
public void CanResizeColumnsUsingShorthand() { RootColumn root = new RootColumn(); ColumnContainer target = new ColumnContainer(root); target.SetNumberOfColumns(3); Assert.AreEqual(3, target.Columns.Count, "Column Cound should be 3"); Assert.AreEqual(ColumnSize.Size4, target.Columns[0].Size, "First column number should be size 4"); Assert.AreEqual(ColumnSize.Size4, target.Columns[1].Size, "Second column number should be size 4"); Assert.AreEqual(ColumnSize.Size4, target.Columns[2].Size, "Third column number should be size 4"); Assert.IsTrue(target.SetColumnSizes("10,1,1"), "Column set size should be true"); Assert.AreEqual(ColumnSize.Size10, target.Columns[0].Size, "First column number should be size 10"); Assert.AreEqual(ColumnSize.Size1, target.Columns[1].Size, "Second column number should be size 1"); Assert.AreEqual(ColumnSize.Size1, target.Columns[2].Size, "Third column number should be size 1"); }