@Retention(RUNTIME) @Documented @Target({METHOD,TYPE,PACKAGE}) public @interface DbUnitConfig
For example:
@DbUnitConfig(DefaultConfig.class)
public class TestClass {
@Rule
public DbUnitRule rule = new DbUnitRule(connectionFactory);
@Test
public void test1() {
}
@Test
@DbUnitDataSet("/dataset/xml/table1.xml")
public void test2() {
}
public static class DefaultConfig implements DbUnitConfigInterceptor {
@Override
public void applyConfiguration(DatabaseConfig config) {
config.setProperty(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES, true);
}
}
}
DatabaseConfig
Modifier and Type | Required Element | Description |
---|---|---|
Class<? extends DbUnitConfigInterceptor> |
value |
The interceptor class that will be instantiated and executed before applying DbUnit dataset.
|
Class<? extends DbUnitConfigInterceptor> value
Copyright © 2017. All rights reserved.