Package ch.inftec.ju.ee.test.TestRunnerAnnotationHandler

Examples of ch.inftec.ju.ee.test.TestRunnerAnnotationHandler.ContainerTestContextSetter


//  @Inject
//  private DateProvider dateProvider;

  @Override
  public SystemPropertyTempSetter runPreTestActionsInEjbContext(TestRunnerAnnotationHandler handler) throws Exception {
    try (ContainerTestContextSetter s = handler.new ContainerTestContextSetter()) {
      SystemPropertyTempSetter tempSetter = handler.initContainerTestEnv();

      try (TxHandler txHandler = new TxHandler(this.tx, true)) {
        // Execute post test annotations (dataset exporting, data verifying)
        handler.executePreTestAnnotations(new JuEmUtil(this.em));
View Full Code Here


    }
  }
 
  @Override
  public void runTestMethodInEjbContext(TestRunnerAnnotationHandler handler) throws Exception {
    try (ContainerTestContextSetter s = handler.new ContainerTestContextSetter()) {
      try (TxHandler txHandler = new TxHandler(this.tx, true)) {
        logger.debug(String.format("Running Test %s", handler));
        // this.dateProvider.resetProvider();

        // Run the test method
View Full Code Here

    }
  }
 
  @Override
  public void runPostTestActionsInEjbContext(TestRunnerAnnotationHandler handler) throws Exception {
    try (ContainerTestContextSetter s = handler.new ContainerTestContextSetter()) {
      // Run post server annotations in an own annotation so any changed made there is available in the export / verifying phase
      try (TxHandler txHandler = new TxHandler(this.tx, true)) {
        // Execute post test annotations (dataset exporting, data verifying)
        handler.executePostServerCode(new JuEmUtil(this.em));
        txHandler.commit(); // Commit after data verifying / exporting
View Full Code Here

    }
  }

  @Override
  public void cleanupTestRun(TestRunnerAnnotationHandler handler, SystemPropertyTempSetter tempSetter) {
    try (ContainerTestContextSetter s = handler.new ContainerTestContextSetter(true)) {
      tempSetter.close();

      // Clear property chain if clearing property is set
      if (JuUtils.getJuPropertyChain().get("ju-testing-ee.clearPropertyChainAfterEachTest", Boolean.class, "false")) {
        JuUtils.clearPropertyChain();
View Full Code Here

TOP

Related Classes of ch.inftec.ju.ee.test.TestRunnerAnnotationHandler.ContainerTestContextSetter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.