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

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

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

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

TestRunnerContext context = new TestRunnerContext();
Path localRoot = Paths.get(".").toAbsolutePath();
context.setLocalRoot(localRoot.toString());
logger.info("New test context: " + context.getUuid());
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(Path relativePath, boolean createParentDirectories) {
    Path localRoot = Paths.get(this.context.getLocalRoot());
    Path localPath = localRoot.resolve(relativePath);
    
    if (createParentDirectories) {
      try {
        Files.createDirectories(localPath.getParent());
      } catch (IOException ex) {
        throw new JuRuntimeException("Couldn't create parent directories", ex);
      }
    }
    
    return localPath;
  }
}
origin: ch.inftec.ju/ju-util-ee

TestRunnerContext context = new TestRunnerContext();
Path localRoot = Paths.get(".").toAbsolutePath();
context.setLocalRoot(localRoot.toString());
logger.info("New test context: " + context.getUuid());
origin: ch.inftec.ju/ju-ee-testing

  /**
   * 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(Path relativePath, boolean createParentDirectories) {
    Path localRoot = Paths.get(this.context.getLocalRoot());
    Path localPath = localRoot.resolve(relativePath);
    
    if (createParentDirectories) {
      try {
        Files.createDirectories(localPath.getParent());
      } catch (IOException ex) {
        throw new JuRuntimeException("Couldn't create parent directories", ex);
      }
    }
    
    return localPath;
  }
}
origin: ch.inftec.ju/ju-ee-testing

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

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

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

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

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

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

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

ch.inftec.ju.ee.testTestRunnerFacade$TestRunnerContext

Javadoc

Helper class that contains information about the context the test runs within.

Most used methods

  • <init>
  • getLocalRoot
    Gets the root path of the local (i.e. not server) test. This can be used to create files in a locati
  • getUuid
    Gets a unique ID identifying the test run. This can be used to correlate multiple remote calls to th
  • setLocalRoot

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top plugins for Android Studio
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