public void TestAddPdfTable()
        {
            //Arrange
            PdfHelper helper = new PdfHelper();
            //Act
            var result = helper.AddPdfTable(2, new float[] { 2, 2 });

            //Assert
            Assert.IsTrue(result != null);
        }
Example #2
0
        private static PdfPTable SetHeaderTable()
        {
            var       align = PdfAlign.Left;
            PdfPTable table = _helper.AddPdfTable(4, new float[] { 250f, 250f, 250f, 250f });

            table.AddCell(_helper.AddCellHeader("Column 1", align, true, true));
            table.AddCell(_helper.AddCellHeader("Column 2", align, true));
            table.AddCell(_helper.AddCellHeader("Column 3", align, true, true));
            table.AddCell(_helper.AddCellHeader("Column 4", align, true));

            return(table);
        }
        public void TestAddPdfTableDistintNumbers()
        {
            //Arrange
            PdfHelper helper = new PdfHelper();

            try
            {
                //Act
                _ = helper.AddPdfTable(2, new float[] { 2 });
            }
            catch (Exception ex)
            {
                //Assert
                Assert.IsTrue(ex != null);
            }
        }