public interface TestRunnerFacade
The facade is supposed to perform regular EJB transaction commit or rollback, depending on the exception that might arise when executing test methods.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
TestRunnerFacade.ContextAware
Interface for classes that are context aware, i.e.
|
static class |
TestRunnerFacade.DataVerifierInfo
Helper object that contains information to instantiate a DataVerifier.
|
static interface |
TestRunnerFacade.Initializable
Interfaces for classes that would like to be initialized before the test method is run
(some functionality as a @Before method would provide).
|
static class |
TestRunnerFacade.TestRunnerContext
Helper class that contains information about the context the test runs within.
|
| Modifier and Type | Method and Description |
|---|---|
void |
resetSystemProperties(ch.inftec.ju.util.SystemPropertyTempSetter tempSetter)
Resets the system properties to their original state.
|
Object |
runMethodInEjbContext(String className,
String methodName,
Class<?>[] parameterTypes,
Object[] args)
Runs an arbitrary method in an EJB context and returns the result of the method.
|
void |
runPostTestActionsInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
Runs post test actions (like data set exports and data verifies) in an EJB context.
|
ch.inftec.ju.util.SystemPropertyTempSetter |
runPreTestActionsInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
Runs pre test actions (like data set loading) in an EJB context.
|
void |
runTestMethodInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
Runs a (test) method in an EJB context, allowing it to use container functionality and
beans.
|
ch.inftec.ju.util.SystemPropertyTempSetter runPreTestActionsInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
throws Exception
handler - TestRunner handler providing information about the test class and methodException - If the actions failvoid runTestMethodInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
throws Exception
handler - TestRunner handler that provides information about the test class and methodException - If the method fails with an exception (including test assertion failures)void runPostTestActionsInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
throws Exception
handler - TestRunner handler providing information about the test class and methodException - If the actions failvoid resetSystemProperties(ch.inftec.ju.util.SystemPropertyTempSetter tempSetter)
Must be called with the SystemPropertyTempSetter returned by the runPreTestActionInEjbContext method
tempSetter - SystemPropertyTempSetter that is used to restore the system property to their original (i.e. pre test)
stateObject runMethodInEjbContext(String className, String methodName, Class<?>[] parameterTypes, Object[] args) throws Exception
className - Class name that contains the methodmethodName - Method nameparameterTypes - Array of argument typesargs - Array of argumentsExceptionCopyright © 2014. All rights reserved.