Class DbUnitLoadingRule
- java.lang.Object
-
- org.silverpeas.core.test.integration.rule.DbSetupRule
-
- org.silverpeas.core.test.integration.rule.DbUnitLoadingRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class DbUnitLoadingRule extends DbSetupRule
This rule permits to load data into database via DbUnit framework. It benefits of the useful ruleDbSetupRule
.- Author:
- Yohann Chastagnier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.test.integration.rule.DbSetupRule
DbSetupRule.TableRow
-
-
Constructor Summary
Constructors Constructor Description DbUnitLoadingRule(String tableCreationSqlScript, String xmlDataSet)
Mandatory constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
performBefore(org.junit.runner.Description description)
-
Methods inherited from class org.silverpeas.core.test.integration.rule.DbSetupRule
apply, createDefaultTables, createTablesFrom, getActualDataSet, getSafeConnection, getSafeConnectionFromDifferentThread, getTableRowFor, getTableRowsFor, loadInitialDataSetFrom, loadInitialDataSetFrom, mapJdbcSqlQueryResultAsListOfMappedValues, openSafeConnection, performAfter
-
-
-
-
Constructor Detail
-
DbUnitLoadingRule
public DbUnitLoadingRule(String tableCreationSqlScript, String xmlDataSet)
Mandatory constructor.- Parameters:
tableCreationSqlScript
- the name of the file, without path, which contains the scripts of table creation. If the file is not in the same package of the integration test class, then the complete path of the resource (from the maven target test resources) must be given (org/silverpeas/general.properties
for example).xmlDataSet
- the name of the file which contains the data to load into the database (the name of file without path or the complete path, same behaviour than tableCreationSqlScript
-
-
Method Detail
-
performBefore
protected void performBefore(org.junit.runner.Description description)
- Overrides:
performBefore
in classDbSetupRule
-
-