Tabnine Logo
ch.inftec.ju.ee.test
Code IndexAdd Tabnine to your IDE (free)

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

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

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

public ContainerTestContextSetter() {
  ContainerTestContext.startContext(getContext() != null
      ? getContext().getUuid()
      : null);
}
origin: ch.inftec.ju/ju-ee-testing

@Override
public void evaluate() throws Throwable {
  try {
    this.doEvaluation(TestRunnerUtils.getTestRunnerFacade(), this.context);
  } catch (Throwable t) {
    throw RemoteUtils.getActualThrowable(t);
  }
}

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

UUID getUuid() {
  return this.getContext() != null
      ? this.getContext().getUuid()
      : null;
}
origin: ch.inftec.ju/ju-ee-testing

private void initTestClass(Object instance, TxHandler txHandler) {
  // Try to set the context (if the class is ContextAware)
  if (ContextAware.class.isAssignableFrom(instance.getClass())) {
    ((ContextAware) instance).setContext(this.getContext());
  }
  
  if (TransactionAware.class.isAssignableFrom(instance.getClass())) {
    ((TransactionAware) instance).setTxHandler(txHandler);
  }
  
  // Try to call the init method (if the class implements Initializable)
  if (Initializable.class.isAssignableFrom(instance.getClass())) {
    ((Initializable) instance).init();
  }
}

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

@Override
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext) {
  T t = this.get(contextual);
  if (t == null) {
    Bean<T> b = (Bean<T>) contextual;
    return storeObject(b.getBeanClass(), new CustomScopeInstance<T>(b, creationalContext));
  } else {
    return t;
  }
}
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-util-ee

@Override
protected String getLocalRoot() {
  return this.getContext().getLocalRoot();
}

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

@Override
public void close() {
  ContainerTestContext.endContext(this.disposeContext);
}
origin: ch.inftec.ju/ju-ee-testing

@Override
public boolean isActive() {
  return isContextActive();
}
origin: ch.inftec.ju/ju-util-ee

/**
 * Gets a Path instance relative to the 'local' test (rather than the JBoss server context).
 * 
 * @param relativePath
 *            Relative path like <code>target/file.xml</code>
 * @param createParentDirectories
 *            If true, the parent directories of the path are created if necessary
 * @return Path relative to the unit test VM
 */
protected final Path getLocalPath(String relativePath, boolean createParentDirectories) {
  return this.getLocalPath(Paths.get(relativePath), createParentDirectories);
}

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

  /**
   * Looks up a TestRunnerFacade using a remote JNDI service locator, configured by JU property files.
   * @return TestRunnerFacade instance
   */
  public static synchronized TestRunnerFacade getTestRunnerFacade() {
    if (testRunnerFacade == null) {
      testRunnerFacade = getRemoteServiceLocator().lookup(TestRunnerFacade.class);
    }
    return testRunnerFacade;
  }
}
origin: ch.inftec.ju/ju-util-ee

private void initTestClass(Object instance, TxHandler txHandler) {
  // Try to set the context (if the class is ContextAware)
  if (ContextAware.class.isAssignableFrom(instance.getClass())) {
    ((ContextAware) instance).setContext(this.getContext());
  }
  
  if (TransactionAware.class.isAssignableFrom(instance.getClass())) {
    ((TransactionAware) instance).setTxHandler(txHandler);
  }
  
  // Try to call the init method (if the class implements Initializable)
  if (Initializable.class.isAssignableFrom(instance.getClass())) {
    ((Initializable) instance).init();
  }
}

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

public ContainerTestContextSetter() {
  ContainerTestContext.startContext(getContext() != null
      ? getContext().getUuid()
      : null);
}
origin: ch.inftec.ju/ju-util-ee

@Override
public void evaluate() throws Throwable {
  try {
    this.doEvaluation(TestRunnerUtils.getTestRunnerFacade(), this.context);
  } catch (Throwable t) {
    throw RemoteUtils.getActualThrowable(t);
  }
}

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

@Override
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext) {
  T t = this.get(contextual);
  if (t == null) {
    Bean<T> b = (Bean<T>) contextual;
    return storeObject(b.getBeanClass(), new CustomScopeInstance<T>(b, creationalContext));
  } else {
    return t;
  }
}
origin: ch.inftec.ju/ju-ee-testing

UUID getUuid() {
  return this.getContext() != null
      ? this.getContext().getUuid()
      : null;
}
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-ee-testing

@Override
protected String getLocalRoot() {
  return this.getContext().getLocalRoot();
}

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

@Override
public void close() {
  ContainerTestContext.endContext(this.disposeContext);
}
origin: ch.inftec.ju/ju-util-ee

@Override
public boolean isActive() {
  return isContextActive();
}
ch.inftec.ju.ee.test

Most used classes

  • RequestHolder
  • AbstractTestBean
    Base class for simple test beans.
  • ContainerTest
    Base class for container tests, i.e. integration tests that run in the application server VM. Note t
  • ContainerTestContext$CustomScopeInstance
  • ContainerTestContext
    Context that covers the lifetime of a ContainerTest test method. If not running in a ContainerTest s
  • ContainerTestRunnerRule$ContainerRunnerStatement,
  • ContainerTestRunnerRule$ContainerTestRunnerStatement,
  • DataVerifierCdi,
  • RemoteUtils,
  • TestRemote,
  • TestRunnerAnnotationHandler$ContainerTestContextSetter,
  • TestRunnerAnnotationHandler,
  • TestRunnerFacade$ContextAware,
  • TestRunnerFacade$Initializable,
  • TestRunnerFacade$TestRunnerContext,
  • TestRunnerFacade$TransactionAware,
  • TestRunnerFacade,
  • TestRunnerUtils,
  • Greeter
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