public class TestRunnerFacadeBean extends Object implements TestRunnerFacade
We'll use bean managed transaction management to control the transactions better.
TestRunnerFacade.ContextAware, TestRunnerFacade.DataVerifierInfo, TestRunnerFacade.Initializable, TestRunnerFacade.TestRunnerContext, TestRunnerFacade.TransactionAware| Constructor and Description |
|---|
TestRunnerFacadeBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupTestRun(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler,
ch.inftec.ju.util.SystemPropertyTempSetter tempSetter)
Resets the system properties to their original state and ends the test context on the server.
|
String |
getVersion()
Gets the version of the TestRunnerFacade.
|
Object |
runMethodInEjbContext(String className,
String methodName,
Class<?>[] argumentTypes,
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.
|
public ch.inftec.ju.util.SystemPropertyTempSetter runPreTestActionsInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
throws Exception
TestRunnerFacaderunPreTestActionsInEjbContext in interface TestRunnerFacadehandler - TestRunner handler providing information about the test class and methodException - If the actions failpublic void runTestMethodInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
throws Exception
TestRunnerFacaderunTestMethodInEjbContext in interface TestRunnerFacadehandler - TestRunner handler that provides information about the test class and methodException - If the method fails with an exception (including test assertion failures)public void runPostTestActionsInEjbContext(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler)
throws Exception
TestRunnerFacaderunPostTestActionsInEjbContext in interface TestRunnerFacadehandler - TestRunner handler providing information about the test class and methodException - If the actions failpublic Object runMethodInEjbContext(String className, String methodName, Class<?>[] argumentTypes, Object[] args) throws Exception
TestRunnerFacaderunMethodInEjbContext in interface TestRunnerFacadeclassName - Class name that contains the methodmethodName - Method nameargumentTypes - Array of argument typesargs - Array of argumentsExceptionpublic void cleanupTestRun(ch.inftec.ju.ee.test.TestRunnerAnnotationHandler handler,
ch.inftec.ju.util.SystemPropertyTempSetter tempSetter)
TestRunnerFacadeMust be called with the SystemPropertyTempSetter returned by the runPreTestActionInEjbContext method
cleanupTestRun in interface TestRunnerFacadehandler - TestRunner handler providing information about the test class and methodtempSetter - SystemPropertyTempSetter that is used to restore the system property to their original (i.e. pre test)
statepublic String getVersion()
TestRunnerFacadeThis can be used for remote lookup testing purposes.
getVersion in interface TestRunnerFacadeCopyright © 2015. All rights reserved.