@Override
  public void runBare() throws Throwable {
    createUsers();

    log.error(EMPTY_LINE);

    try {

      deploymentId = TestHelper.annotationDeploymentSetUp(processEngine, getClass(), getName());

      super.runBare();

    } catch (AssertionFailedError e) {
      log.error(EMPTY_LINE);
      log.error("ASSERTION FAILED: {}", e, e);
      exception = e;
      throw e;

    } catch (Throwable e) {
      log.error(EMPTY_LINE);
      log.error("EXCEPTION: {}", e, e);
      exception = e;
      throw e;

    } finally {
      TestHelper.annotationDeploymentTearDown(processEngine, deploymentId, getClass(), getName());
      dropUsers();
      assertAndEnsureCleanDb();
      processEngineConfiguration.getClock().reset();
    }
  }
Exemplo n.º 2
0
  @Before
  public void injectDependencies() throws Exception {

    MockitoAnnotations.initMocks(this);
    Mockitos.register(this);

    new TestContextManager(getClass()).prepareTestInstance(this);
    processEngine = TestHelper.getProcessEngine(activitiRule.getConfigurationResource());
    activitiRule.setProcessEngine(processEngine);

    ActivitiFluentTestHelper.setUpEngineAndServices(
        activitiRule.getProcessEngine(),
        activitiRule.getProcessEngine().getRepositoryService(),
        activitiRule.getProcessEngine().getRuntimeService(),
        activitiRule.getProcessEngine().getTaskService(),
        activitiRule.getProcessEngine().getHistoryService(),
        activitiRule.getProcessEngine().getIdentityService(),
        activitiRule.getProcessEngine().getManagementService(),
        activitiRule.getProcessEngine().getFormService());
  }
 private void initializeProcessEngine() {
   processEngine = TestHelper.getProcessEngine(configurationResource);
   ProcessEnginesRest.init();
   ProcessEngines.registerProcessEngine(processEngine);
 }