com.github.springtestdbunit.annotation
Annotation Type DatabaseSetup


@Documented
@Inherited
@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface DatabaseSetup

Test annotation which indicates how to put a database into a know state before tests are run. This annotation can be placed on a class or on methods. When placed on a class the setup is applied before each test methods is executed.

Author:
Phillip Webb
See Also:
DatabaseTearDown, ExpectedDatabase, DbUnitConfiguration, DbUnitTestExecutionListener

Required Element Summary
 String[] value
          Provides the locations of the datasets that will be used to reset the database.
 
Optional Element Summary
 DatabaseOperation type
          Determines the type of operation that will be used to reset the database.
 

Element Detail

value

public abstract String[] value
Provides the locations of the datasets that will be used to reset the database. Unless otherwise configured locations are relative to the class under test.

Returns:
The dataset locations
See Also:
DbUnitConfiguration.dataSetLoader()

type

public abstract DatabaseOperation type
Determines the type of operation that will be used to reset the database.

Returns:
The type of operation used to reset the database
Default:
com.github.springtestdbunit.annotation.DatabaseOperation.CLEAN_INSERT


Copyright © 2012. All Rights Reserved.