Exemplo n.º 1
0
 public TabLayout Row(Action<TabLayoutRow> row)
 {
     var layoutRow = new TabLayoutRow();
     row.Invoke(layoutRow);
     rows.Add(layoutRow);
     return this;
 }
Exemplo n.º 2
0
        public TabLayout Row(Action <TabLayoutRow> row)
        {
            var layoutRow = new TabLayoutRow();

            row.Invoke(layoutRow);
            rows.Add(layoutRow);
            return(this);
        }
Exemplo n.º 3
0
		public void ConstructWithNoCells()
		{
			var row = new TabLayoutRow();

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

			Assert.Equal(0, cells.Count());
		}
Exemplo n.º 4
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());
		}
Exemplo n.º 5
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);
		}
Exemplo n.º 6
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);
		}