public interface PrepAndExpectedTestCase
Modifier and Type | Method and Description |
---|---|
void |
cleanupData()
Cleanup tables specified in prep and expected datasets, using the
provided databaseTester.
|
void |
configureTest(VerifyTableDefinition[] verifyTableDefinitions,
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[] verifyTables,
java.lang.String[] prepDataFiles,
java.lang.String[] expectedDataFiles)
Convenience method to call configureTest() and preTest().
|
java.lang.Object |
runTest(VerifyTableDefinition[] verifyTables,
java.lang.String[] prepDataFiles,
java.lang.String[] expectedDataFiles,
PrepAndExpectedTestCaseSteps testSteps)
Run the DbUnit test.
|
void |
verifyData()
For the provided VerifyTableDefinitions, verify each table's actual
results are as expected.
|
void configureTest(VerifyTableDefinition[] verifyTableDefinitions, java.lang.String[] prepDataFiles, java.lang.String[] expectedDataFiles) throws java.lang.Exception
verifyTableDefinitions
- Table definitions to verify after test execution.prepDataFiles
- The prep data files (as classpath resources) to load and
insert contents into the database as seed data.expectedDataFiles
- The expected data files (as classpath resources) to load as
expected data and verify actual data matches at test end.java.lang.Exception
void preTest() throws java.lang.Exception
java.lang.Exception
void preTest(VerifyTableDefinition[] verifyTables, java.lang.String[] prepDataFiles, java.lang.String[] expectedDataFiles) throws java.lang.Exception
verifyTables
- Table definitions to verify after test execution.prepDataFiles
- The prep data files (as classpath resources) to load and
insert contents into the database as seed data.expectedDataFiles
- The expected data files (as classpath resources) to load as
expected data and verify actual data matches at test end.java.lang.Exception
java.lang.Object runTest(VerifyTableDefinition[] verifyTables, java.lang.String[] prepDataFiles, java.lang.String[] expectedDataFiles, PrepAndExpectedTestCaseSteps testSteps) throws java.lang.Exception
verifyTables
- Table definitions to verify after test execution.prepDataFiles
- The prep data files (as classpath resources) to load and
insert contents into the database as seed data.expectedDataFiles
- The expected data files (as classpath resources) to load as
expected data and verify actual data matches at test end.testSteps
- The test steps to run.java.lang.Exception
void postTest() throws java.lang.Exception
java.lang.Exception
void postTest(boolean verifyData) throws java.lang.Exception
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.java.lang.Exception
void verifyData() throws java.lang.Exception
java.lang.Exception
void cleanupData() throws java.lang.Exception
IDatabaseTester.onTearDown()
.java.lang.Exception
IDataSet getPrepDataset()
IDataSet getExpectedDataset()
Copyright © 2002-2020. All Rights Reserved.