org.ujac.print.test
Class DocumentPrinterTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.ujac.print.test.BasePrintTest
              extended by org.ujac.print.test.DocumentPrinterTest
All Implemented Interfaces:
junit.framework.Test

public class DocumentPrinterTest
extends BasePrintTest

Name: DocumentPrinterTest
Description: Common test cases for the document printer. Some of these test cases only check whether the PDF generation work, they do not prove the correctness of the results! Other test cases are performing automated tests, based on the DocumentTagInterceptor concept.

Author:
lauerc

Nested Class Summary
 class DocumentPrinterTest.ChartTestTuple
          Name: ChartTestTuple
Description: A class for chart test values.
 class DocumentPrinterTest.Person
          Name: Person
Description: Test bean.
 
Field Summary
 
Fields inherited from class org.ujac.print.test.BasePrintTest
docPrinter, docProperties, formatHelper, resourceLoader, templateInterpreter
 
Constructor Summary
DocumentPrinterTest()
           
 
Method Summary
protected  void setUp()
          Sets up the test data.
 void testAcroForm()
          Tests AcroForm output.
 void testAnchor()
          Tests anchor handling.
 void testBarcode()
          Tests barcode output.
 void testChartInstance()
          Tests chart instance output.
 void testCharts()
          Tests chart output.
 void testColor()
          Tests color handling.
 void testColumnText()
          Tests column text usage.
 void testConditions()
          Tests conditional tag evaluation.
 void testCustomTags()
          Tests custom tag handling.
 void testDefineTable()
          Tests the <define-table> tag.
 void testEncryption()
          Tests usage of document encryption.
 void testFont()
          Tests font handling.
 void testGraphics()
          Tests graphic output.
 void testHeaderFooter()
          Tests header/footer usage.
 void testI18n()
          Tests internationalization.
 void testImages()
          Tests image output.
 void testList()
          Tests list output.
 void testLog()
          Tests log output.
 void testOverlay()
          Tests usage of overlays.
 void testSection()
          Tests chapter and section output.
 void testSegments()
          Tests handling of segments.
 void testSetFormat()
          Tests the <set-format> tag.
 void testSetProperty()
          Tests the <set-property> tag.
 void testSpecialCharacters()
          Tests the <set-format> tag.
 void testSticky()
          Tests handling of sticky tags.
 void testStyle()
          Tests the <style-def> tag.
 void testToc()
          Tests TOC handling.
 void testVerticalSpacing()
          Tests handling of vertical spacings.
 void testViewerPreferences()
          Tests usage of viewer preferences.
 void testWatermark()
          Tests usage of watermarks.
 void testWhitespaces()
          Tests whitespace handling output.
 
Methods inherited from class org.ujac.print.test.BasePrintTest
addTagTest, clearTagTests, isAllTagTestsPassed, loadProperties, printDocument, printDocument, setTemplateSource
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentPrinterTest

public DocumentPrinterTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Sets up the test data.

Overrides:
setUp in class BasePrintTest
Throws:
Exception - In case a problem occured during the set up.

testBarcode

public void testBarcode()
                 throws DocumentHandlerException,
                        IOException
Tests barcode output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testImages

public void testImages()
                throws DocumentHandlerException,
                       IOException,
                       com.lowagie.text.BadElementException
Tests image output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.
com.lowagie.text.BadElementException - In case the Jpeg handling failed.

testOverlay

public void testOverlay()
                 throws DocumentHandlerException,
                        IOException
Tests usage of overlays.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testCharts

public void testCharts()
                throws DocumentHandlerException,
                       IOException
Tests chart output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testChartInstance

public void testChartInstance()
                       throws DocumentHandlerException,
                              IOException,
                              ChartException
Tests chart instance output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.
ChartException - In case the chart processing failed.

testWhitespaces

public void testWhitespaces()
                     throws DocumentHandlerException,
                            IOException
Tests whitespace handling output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testFont

public void testFont()
              throws DocumentHandlerException,
                     IOException
Tests font handling.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testHeaderFooter

public void testHeaderFooter()
                      throws DocumentHandlerException,
                             IOException
Tests header/footer usage.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testList

public void testList()
              throws DocumentHandlerException,
                     IOException
Tests list output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testI18n

public void testI18n()
              throws DocumentHandlerException,
                     IOException
Tests internationalization.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testCustomTags

public void testCustomTags()
                    throws DocumentHandlerException,
                           IOException
Tests custom tag handling.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testAnchor

public void testAnchor()
                throws DocumentHandlerException,
                       IOException
Tests anchor handling.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testSection

public void testSection()
                 throws DocumentHandlerException,
                        IOException
Tests chapter and section output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testColumnText

public void testColumnText()
                    throws DocumentHandlerException,
                           IOException
Tests column text usage.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testToc

public void testToc()
             throws DocumentHandlerException,
                    IOException
Tests TOC handling.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testAcroForm

public void testAcroForm()
                  throws DocumentHandlerException,
                         IOException
Tests AcroForm output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testGraphics

public void testGraphics()
                  throws DocumentHandlerException,
                         IOException
Tests graphic output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testVerticalSpacing

public void testVerticalSpacing()
                         throws DocumentHandlerException,
                                IOException
Tests handling of vertical spacings.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testColor

public void testColor()
               throws DocumentHandlerException,
                      IOException
Tests color handling.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testSticky

public void testSticky()
                throws DocumentHandlerException,
                       IOException
Tests handling of sticky tags.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testViewerPreferences

public void testViewerPreferences()
                           throws DocumentHandlerException,
                                  IOException
Tests usage of viewer preferences.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testSegments

public void testSegments()
                  throws DocumentHandlerException,
                         IOException
Tests handling of segments.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testEncryption

public void testEncryption()
                    throws DocumentHandlerException,
                           IOException
Tests usage of document encryption.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testWatermark

public void testWatermark()
                   throws DocumentHandlerException,
                          IOException
Tests usage of watermarks.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testLog

public void testLog()
             throws DocumentHandlerException,
                    IOException
Tests log output.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testDefineTable

public void testDefineTable()
                     throws DocumentHandlerException,
                            IOException
Tests the <define-table> tag.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testStyle

public void testStyle()
               throws DocumentHandlerException,
                      IOException
Tests the <style-def> tag.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testSetFormat

public void testSetFormat()
                   throws DocumentHandlerException,
                          IOException,
                          ParseException,
                          TableException
Tests the <set-format> tag.

Throws:
DocumentHandlerException - If something went wrong at document handling.
ParseException - In case a date could not be parsed.
IOException - In case something went wrong during output.
TableException - In case a table processing error occurred.

testSetProperty

public void testSetProperty()
                     throws DocumentHandlerException,
                            IOException,
                            ParseException,
                            TableException
Tests the <set-property> tag.

Throws:
DocumentHandlerException - If something went wrong at document handling.
ParseException - In case a date could not be parsed.
IOException - In case something went wrong during output.
TableException - In case a table processing error occurred.

testSpecialCharacters

public void testSpecialCharacters()
                           throws DocumentHandlerException,
                                  IOException
Tests the <set-format> tag.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

testConditions

public void testConditions()
                    throws DocumentHandlerException,
                           IOException
Tests conditional tag evaluation.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.