Exemplo n.º 1
0
        public void TestToString()
        {
            TableLine line = new TableLine();

            TextElement tElement = new TextElement(new PdfRectangle(), UtilsForTesting.HELVETICA_BOLD, 10, "test", 5, 0);
            TextChunk   tChunk   = new TextChunk(tElement);

            line.AddTextChunk(0, tChunk);
            line.AddTextChunk(0, tChunk);
            Assert.Equal("Tabula.TableLine[left=0.00,bottom=0.00,right=0.00,top=0.00,chunks='testtest', ]", line.ToString());
            //Assert.Equal("technology.tabula.Line[x=0.0,y=0.0,w=0.0,h=0.0,bottom=0.000000,right=0.000000,chunks='testtest', ]", line.ToString());
        }
Exemplo n.º 2
0
        public void TestLessThanAddTextChunkIntTextChunk()
        {
            TableLine line = new TableLine();

            TextElement tElement = new TextElement(new PdfRectangle(), UtilsForTesting.HELVETICA_BOLD, 10, "test", 5, 0);
            TextChunk   tChunk   = new TextChunk(tElement);

            line.AddTextChunk(0, tChunk);
            line.AddTextChunk(0, tChunk);

            Assert.Equal("testtest", line.TextElements[0].GetText());
        }
Exemplo n.º 3
0
        public void TestErrorAddTextChunkIntTextChunk()
        {
            TableLine   line     = new TableLine();
            TextElement tElement = new TextElement(new PdfRectangle(), UtilsForTesting.HELVETICA_BOLD, 10, "testTabula3", 5, 0);
            TextChunk   tChunk   = new TextChunk(tElement);

            Assert.Throws <ArgumentException>(() => line.AddTextChunk(-1, tChunk));
        }