public void TestAddCellBody() { //Arrange PdfHelper helper = new PdfHelper(); //Act var result = helper.AddCellBody("dat"); //Assert Assert.AreEqual(new PdfPCell(), result); }
public void TestAddCellBodyNull() { //Arrange PdfHelper helper = new PdfHelper(); try { //Act _ = helper.AddCellBody(null); } catch (Exception ex) { //Assert Assert.IsTrue(ex != null); } }
private static PdfPTable SetRowsTable(PdfPTable table) { var align = PdfAlign.Left; bool bold = true; //ROW1 table.AddCell(_helper.AddCellBody("Row 1.1", align, true)); table.AddCell(_helper.AddCellBody("Row 1.2", align, true, bold)); table.AddCell(_helper.AddCellBody("Row 1.3", align, true)); table.AddCell(_helper.AddCellBody("Row 1.4", align, true, bold)); //ROW2 table.AddCell(_helper.AddCellBody("Row 2.1", align, false)); table.AddCell(_helper.AddCellBody("Row 2.2", align, false, bold)); table.AddCell(_helper.AddCellBody("Row 2.3", align, false)); table.AddCell(_helper.AddCellBody("Row 2.4", align, false, bold)); //ROW3 table.AddCell(_helper.AddCellBody("Row 3.1", align, false)); table.AddCell(_helper.AddCellBody("Row 3.2", align, false, bold)); table.AddCell(_helper.AddCellBody("Row 3.3", align, false)); table.AddCell(_helper.AddCellBody("Row 3.4", align, false, bold)); return(table); }