FileDocCategorySizeDatePackage
TestHDFDocument.javaAPI DocApache Poi 3.0.14896Mon Jan 01 18:55:34 GMT 2007org.apache.poi.hdf.model

TestHDFDocument

public class TestHDFDocument extends TestCase
Class to test HDFDocument functionality
author
Bob Otterberg

Fields Summary
Constructors Summary
public TestHDFDocument(String name)

        super( name );
    
Methods Summary
public voidfixme_testEmpty()
TEST NAME: Test Read Empty

OBJECTIVE: Test that HDF can read an empty document (empty.doc).

SUCCESS: HDF reads the document. Matches values in their particular positions.

FAILURE: HDF does not read the document or excepts. HDF cannot identify values in the document in their known positions.


        String filename = System.getProperty( "HDF.testdata.path" );


        filename = filename + "/empty.doc";

        FileInputStream stream = new FileInputStream( filename );

        HDFDocument empty = new HDFDocument( stream );

        stream.close();

    
public voidfixme_testSimple()
TEST NAME: Test Simple

OBJECTIVE: Test that HDF can read an _very_ simple document (simple.doc).

SUCCESS: HDF reads the document. Matches values in their particular positions.

FAILURE: HDF does not read the document or excepts. HDF cannot identify values in the document in their known positions.

        String filename = System.getProperty( "HDF.testdata.path" );
        filename = filename + "/simple.doc";
        FileInputStream stream = new FileInputStream( filename );
        HDFDocument empty = new HDFDocument( stream );
        stream.close();
    
public voidfixme_testSimpleList()
TEST NAME: Test Read Simple List

OBJECTIVE: Test that HDF can read a document containing a simple list (simple-list.doc).

SUCCESS: HDF reads the document. Matches values in their particular positions.

FAILURE: HDF does not read the document or excepts. HDF cannot identify values in the document in their known positions.

        String filename = System.getProperty( "HDF.testdata.path" );

        filename = filename + "/simple-list.doc";
        FileInputStream stream = new FileInputStream( filename );
        HDFDocument empty = new HDFDocument( stream );
        stream.close();
    
public voidfixme_testSimpleTable()
TEST NAME: Test Read Simple Table

OBJECTIVE: Test that HDF can read a document containing a simple table (simple-table.doc).

SUCCESS: HDF reads the document. Matches values in their particular positions.

FAILURE: HDF does not read the document or excepts. HDF cannot identify values in the document in their known positions.

        String filename = System.getProperty( "HDF.testdata.path" );

        filename = filename + "/simple-table.doc";
        FileInputStream stream = new FileInputStream( filename );
        HDFDocument empty = new HDFDocument( stream );
        stream.close();
    
public static voidmain(java.lang.String[] ignored_args)

        String path = System.getProperty( "HDF.testdata.path" );

        // assume this is relative to basedir
        if ( path == null )
        {
            System.setProperty(
                    "HDF.testdata.path",
                    "src/scratchpad/testcases/org/apache/poi/hdf/data" );
        }
        System.out.println( "Testing org.apache.poi.hdf.model.HDFDocument" );

        junit.textui.TestRunner.run( TestHDFDocument.class );
    
public voidtestStopJUnitComplainintAboutNoTests()