net.java.ao.test.jdbc
Annotation Type Data


@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
@Inherited
public @interface Data

Use with ActiveObjectsJUnitRunner to specify schema initialization behavior.

The class specified by this annotation must implement DatabaseUpdater, and must have a no-args constructor. The test runner will instantiate this class and call its DatabaseUpdater.update(net.java.ao.EntityManager) method whenever the database is to be reinitialized (once at the beginning of each test class that uses a unique database configuration, and once after each test method that is marked with @NonTransactional). Normally the DatabaseUpdater.update(net.java.ao.EntityManager) method should just call EntityManager.migrate(Class...) with a list of entity classes; it can also add any data that should exist before running tests.


Optional Element Summary
 Class<? extends DatabaseUpdater> value
           
 

value

public abstract Class<? extends DatabaseUpdater> value
Default:
net.java.ao.test.jdbc.EmptyDatabase.class


Copyright © 2007-2015. All Rights Reserved.