예제 #1
0
		public void ConstructWithNoCells()
		{
			var row = new TabLayoutRow();

            var cells = row.Build() as IEnumerable<object>;

			Assert.Equal(0, cells.Count());
		}
예제 #2
0
		public void AddTwoCells()
		{
			var row = new TabLayoutRow();
			var cell1 = row.Cell(1);
			var cell2 = row.Cell(2);

            var cells = row.Build() as IEnumerable<object>;

			Assert.Equal(2, cells.Count());
			Assert.Equal(cell1, cells.First());
			Assert.Equal(cell2, cells.Last());
		}
예제 #3
0
		public void AddSingleCell()
		{
			const int expectedCellId = 1;
			var row = new TabLayoutRow();
			var cell = row.Cell(expectedCellId);

            var cells = row.Build() as IEnumerable<object>;

			Assert.Equal(1, cells.Count());
			Assert.Equal(cell, cells.First());
			Assert.Equal(cell.Data, expectedCellId);
		}
예제 #4
0
		public void ReturnObjectArrayOfColumnData()
		{
			var row = new TabLayoutRow();

			row.Cell(1);
			row.Cell(2);
			row.Cell(3);

            var cells = row.Build() as IEnumerable<object>;

			Assert.Equal(3, cells.Count());
			Assert.Equal(1, ((TabLayoutCell)cells.ElementAt(0)).Data);
            Assert.Equal(2, ((TabLayoutCell)cells.ElementAt(1)).Data);
            Assert.Equal(3, ((TabLayoutCell)cells.ElementAt(2)).Data);
		}