congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TestRunnerFacade
Code IndexAdd Tabnine to your IDE (free)

How to use
TestRunnerFacade
in
ch.inftec.ju.ee.test

Best Java code snippets using ch.inftec.ju.ee.test.TestRunnerFacade (Showing top 8 results out of 315)

origin: ch.inftec.ju/ju-util-ee

  @Override
  protected void doEvaluation(TestRunnerFacade facade, TestRunnerContext context) throws Throwable {
    TestRunnerAnnotationHandler handler = new TestRunnerAnnotationHandler(method, description, context);
    
    // Run the pre actions
    SystemPropertyTempSetter tempSetter = facade.runPreTestActionsInEjbContext(handler);
    
    try {
      // Run the test statement first. We'll only run the verifiers if the test statement succeeds
      testStatement.evaluate();
      
      // Run the verifiers now
      facade.runPostTestActionsInEjbContext(handler);
    } finally {
      logger.debug("Cleaning up test run for context: " + handler.getUuid());
      facade.cleanupTestRun(handler, tempSetter);
    }
  }
}
origin: ch.inftec.ju/ju-util-ee

/**
 * Runs a parameterless method in an EJB context and returns the result of the method.
 * @param className Class name that contains the method
 * @param methodName Method name
 * @return Result value of the method
 */
protected final <T> T runMethodInEjbContext(String className, String methodName) {
  try {
    @SuppressWarnings("unchecked")
    T res = (T) testRunnerFacade.runMethodInEjbContext(className, methodName, new Class<?>[] {}, new Object[] {});
    return res;
  } catch (Exception ex) {
    throw new JuRuntimeException("Couldn't run method in EjbContext", ex);
  }
}

origin: ch.inftec.ju/ju-ee-testing

    @Override
    protected void doEvaluation(TestRunnerFacade facade, TestRunnerContext context) throws Throwable {
      facade.runTestMethodInEjbContext(new TestRunnerAnnotationHandler(method, description, context));
//            facade.runTestMethodInEjbContext(method.getDeclaringClass().getName(), method.getName(), context);
    }
  }
origin: ch.inftec.ju/ju-ee-testing

  @Override
  protected void doEvaluation(TestRunnerFacade facade, TestRunnerContext context) throws Throwable {
    TestRunnerAnnotationHandler handler = new TestRunnerAnnotationHandler(method, description, context);
    
    // Run the pre actions
    SystemPropertyTempSetter tempSetter = facade.runPreTestActionsInEjbContext(handler);
    
    try {
      // Run the test statement first. We'll only run the verifiers if the test statement succeeds
      testStatement.evaluate();
      
      // Run the verifiers now
      facade.runPostTestActionsInEjbContext(handler);
    } finally {
      logger.debug("Cleaning up test run for context: " + handler.getUuid());
      facade.cleanupTestRun(handler, tempSetter);
    }
  }
}
origin: ch.inftec.ju/ju-ee-testing

/**
 * Runs a parameterless method in an EJB context and returns the result of the method.
 * @param className Class name that contains the method
 * @param methodName Method name
 * @return Result value of the method
 */
protected final <T> T runMethodInEjbContext(String className, String methodName) {
  try {
    @SuppressWarnings("unchecked")
    T res = (T) testRunnerFacade.runMethodInEjbContext(className, methodName, new Class<?>[] {}, new Object[] {});
    return res;
  } catch (Exception ex) {
    throw new JuRuntimeException("Couldn't run method in EjbContext", ex);
  }
}

origin: ch.inftec.ju/ju-util-ee

    @Override
    protected void doEvaluation(TestRunnerFacade facade, TestRunnerContext context) throws Throwable {
      facade.runTestMethodInEjbContext(new TestRunnerAnnotationHandler(method, description, context));
//            facade.runTestMethodInEjbContext(method.getDeclaringClass().getName(), method.getName(), context);
    }
  }
origin: ch.inftec.ju/ju-util-ee

/**
 * Runs an arbitrary method in an EJB context and returns the result of the method.
 * @param className Class name that contains the method
 * @param methodName Method name
 * @param parameterTypes Array of argument types
 * @param args Array of arguments
 * @return Result value of the method
 */
protected final <T> T runMethodInEjbContext(String className, String methodName, Class<?> parameterTypes[], Object args[]) {
  try {
    @SuppressWarnings("unchecked")
    T res = (T) testRunnerFacade.runMethodInEjbContext(className, methodName, parameterTypes, args);
    return res;
  } catch (Exception ex) {
    Throwable actualThrowable = RemoteUtils.getActualThrowable(ex);
    throw new JuRuntimeException("Couldn't run method in EJB context: %s"
        , actualThrowable
        , actualThrowable == null ? null : actualThrowable.getMessage());
  }
}

origin: ch.inftec.ju/ju-ee-testing

/**
 * Runs an arbitrary method in an EJB context and returns the result of the method.
 * @param className Class name that contains the method
 * @param methodName Method name
 * @param parameterTypes Array of argument types
 * @param args Array of arguments
 * @return Result value of the method
 */
protected final <T> T runMethodInEjbContext(String className, String methodName, Class<?> parameterTypes[], Object args[]) {
  try {
    @SuppressWarnings("unchecked")
    T res = (T) testRunnerFacade.runMethodInEjbContext(className, methodName, parameterTypes, args);
    return res;
  } catch (Exception ex) {
    Throwable actualThrowable = RemoteUtils.getActualThrowable(ex);
    throw new JuRuntimeException("Couldn't run method in EJB context: %s"
        , actualThrowable
        , actualThrowable == null ? null : actualThrowable.getMessage());
  }
}

ch.inftec.ju.ee.testTestRunnerFacade

Javadoc

Helper facade to invoke (test) methods from local unit tests in a remote JVM server container context.

The facade is supposed to perform regular EJB transaction commit or rollback, depending on the exception that might arise when executing test methods.

Most used methods

  • cleanupTestRun
    Resets the system properties to their original state and ends the test context on the server. Must b
  • runMethodInEjbContext
    Runs an arbitrary method in an EJB context and returns the result of the method.
  • runPostTestActionsInEjbContext
    Runs post test actions (like data set exports and data verifies) in an EJB context.
  • runPreTestActionsInEjbContext
    Runs pre test actions (like data set loading) in an EJB context.
  • runTestMethodInEjbContext
    Runs a (test) method in an EJB context, allowing it to use container functionality and beans.

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JButton (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now