Class ActiveObjectsJUnitRunner
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
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 Summary
Constructors -
Method Summary
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutMethods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolationMethods inherited from class org.junit.runner.Runner
testCount
-
Constructor Details
-
ActiveObjectsJUnitRunner
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Details
-
rules
- Overrides:
rulesin classorg.junit.runners.BlockJUnit4ClassRunner
-