public final class ActiveObjectsJUnitRunner
extends org.junit.runners.BlockJUnit4ClassRunner
Before each test method is executed, the test runner creates an EntityManager instance and injects
it into the test class; the test class (or a superclass) must have a member field of type EntityManager
for this purpose. The EntityManager configuration is based on the test class annotations @Jdbc,
@Data and @NameConverters; in the absence of these annotations,
the default configuration uses an in-memory HSQL database.
By default, each test method is executed within a separate transaction, which is then rolled back so the
next test is executed with a fresh database state. If you annotate a test method with
@NonTransactional, then it is not executed inside a transaction; instead, the
database is completely reinitialized after executing the test.
| Constructor and Description |
|---|
ActiveObjectsJUnitRunner(Class<?> klass) |
| Modifier and Type | Method and Description |
|---|---|
protected List<org.junit.rules.MethodRule> |
rules(Object test) |
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, methodBlock, methodInvoker, possiblyExpectingExceptions, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutpublic ActiveObjectsJUnitRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorCopyright © 2007-2016. All Rights Reserved.