public TestCaseResult withFailure(Failure value) { setFailure(value); return this; }
@Override public void process(TestCaseResult testCase) { testCase.setStatus(Status.SKIPPED); testCase.setFailure(getFailure()); }
@Override public void process(TestCaseResult testCase) { Status status = throwable instanceof AssertionError ? Status.FAILED : Status.BROKEN; testCase.setStatus(status); testCase.setFailure(getFailure()); }
/** * If test not finished yet (in our case if stop time is zero) mark it as interrupted. * Set message, stop time and status. */ public void markTestcaseAsInterruptedIfNotFinishedYet(TestCaseResult testCase) { if (testCase.getStop() == 0L) { testCase.setStop(System.currentTimeMillis()); testCase.setStatus(Status.BROKEN); testCase.setFailure(new Failure().withMessage("Test was interrupted")); } } }
/** * Change status in specified testCase. If throwable not specified uses * {@link #getDefaultFailure()} and {@link #getFailure()} otherwise * * @param testCase to change */ @Override public void process(TestCaseResult testCase) { testCase.setStatus(getStatus()); testCase.setFailure(throwable == null ? getDefaultFailure() : getFailure()); }