FileDocCategorySizeDatePackage
AllDataFilesTester.javaAPI DocApache Poi 3.0.12995Mon Jan 01 12:39:44 GMT 2007org.apache.poi.hpsf.basic

AllDataFilesTester

public class AllDataFilesTester extends Object

Processes a test method for all OLE2 files in the HPSF test data directory. Well, this class does not check whether a file is an OLE2 file but rather whether its name begins with "Test".

author
Rainer Klute <klute@rainer-klute.de>
since
2006-02-11
version
$Id: AllDataFilesTester.java 489730 2006-12-22 19:18:16Z bayard $

Fields Summary
Constructors Summary
Methods Summary
public voidrunTests(org.apache.poi.hpsf.basic.AllDataFilesTester$TestTask task)

Tests the simplified custom properties.

param
task the task to execute
throws
Throwable

        final String dataDirName = System.getProperty("HPSF.testdata.path");
        final File dataDir = new File(dataDirName);
        final File[] docs = dataDir.listFiles(new FileFilter()
        {
            public boolean accept(final File file)
            {
                return file.isFile() && file.getName().startsWith("Test");
            }});
        for (int i = 0; i < docs.length; i++)
        {
            final File doc = docs[i];
            final Logger logger = Logger.getLogger(getClass().getName());
            logger.info("Processing file \" " + doc.toString() + "\".");

            /* Execute the test task. */
            task.runTest(doc);
        }