org.dbunit
Interface PrepAndExpectedTestCase

All Known Implementing Classes:
DefaultPrepAndExpectedTestCase

public interface PrepAndExpectedTestCase

Test case supporting prep data and expected data.

Since:
2.4.8
Version:
$Revision$ $Date$
Author:
Jeff Jensen jeffjensen AT users.sourceforge.net, Last changed by: $Author$

Method Summary
 void cleanupData()
          Cleanup tables specified in prep and expected datasets, using the provided databaseTester.
 void configureTest(VerifyTableDefinition[] tables, java.lang.String[] prepDataFiles, java.lang.String[] expectedDataFiles)
          Configure the test.
 IDataSet getExpectedDataset()
          Get the expected dataset, created from the expectedDataFiles.
 IDataSet getPrepDataset()
          Get the prep dataset, created from the prepDataFiles.
 void postTest()
          Execute all post-test steps.
 void postTest(boolean verifyData)
          Execute post-test steps.
 void preTest()
          Execute pre-test steps.
 void preTest(VerifyTableDefinition[] tables, java.lang.String[] prepDataFiles, java.lang.String[] expectedDataFiles)
          Convenience method to call configureTest() and preTest().
 

Method Detail

configureTest

void configureTest(VerifyTableDefinition[] tables,
                   java.lang.String[] prepDataFiles,
                   java.lang.String[] expectedDataFiles)
                   throws java.lang.Exception
Configure the test. Call this method before performing the test steps.

Parameters:
tables - Table definitions to verify after test execution.
prepDataFiles - The prep data files to load as seed data.
expectedDataFiles - The expected data files to load as expected data.
Throws:
java.lang.Exception

preTest

void preTest()
             throws java.lang.Exception
Execute pre-test steps. Call this method before performing the test steps.

Throws:
java.lang.Exception

preTest

void preTest(VerifyTableDefinition[] tables,
             java.lang.String[] prepDataFiles,
             java.lang.String[] expectedDataFiles)
             throws java.lang.Exception
Convenience method to call configureTest() and preTest().

Parameters:
tables - Table definitions to verify after test execution.
prepDataFiles - The prep data files to load as seed data.
expectedDataFiles - The expected data files to load as expected data.
Throws:
java.lang.Exception

postTest

void postTest()
              throws java.lang.Exception
Execute all post-test steps. Call this method after performing the test steps.

Throws:
java.lang.Exception

postTest

void postTest(boolean verifyData)
              throws java.lang.Exception
Execute post-test steps. Call this method after performing the test steps.

Parameters:
verifyData - Specify true to perform verify data steps, false to not. Useful to specify false when test has failure in progress (e.g. an exception) and verifying data would fail, masking original test failure.
Throws:
java.lang.Exception

cleanupData

void cleanupData()
                 throws java.lang.Exception
Cleanup tables specified in prep and expected datasets, using the provided databaseTester. See IDatabaseTester.onTearDown().

Throws:
java.lang.Exception

getPrepDataset

IDataSet getPrepDataset()
Get the prep dataset, created from the prepDataFiles.

Returns:
The prep dataset.

getExpectedDataset

IDataSet getExpectedDataset()
Get the expected dataset, created from the expectedDataFiles.

Returns:
The expected dataset.


Copyright © 2002-2010. All Rights Reserved.