Пример #1
0
 private void evaluateTable(SlimTable table) {
   try {
     table.evaluateReturnValues(instructionResults);
     testSummary.add(table.getTestSummary());
   } catch (Throwable e) {
     exceptions.addException("ABORT", exceptionToString(e));
     exceptionOccurred(e);
   }
 }
Пример #2
0
 protected void evaluateExpectations() {
   for (SlimTable.Expectation e : expectations) {
     try {
       e.evaluateExpectation(instructionResults);
     } catch (Throwable ex) {
       exceptions.addException("ABORT", exceptionToString(ex));
       exceptionOccurred(ex);
     }
   }
 }
Пример #3
0
  private void processException(String resultKey, String resultString) {
    testSummary.exceptions++;
    boolean isStopTestException = resultString.contains(SlimServer.EXCEPTION_STOP_TEST_TAG);
    if (isStopTestException) {
      exceptions.setStopTestCalled();
    }

    Matcher exceptionMessageMatcher = exceptionMessagePattern.matcher(resultString);
    if (exceptionMessageMatcher.find()) {
      String prefix = (isStopTestException) ? MESSAGE_FAIL : MESSAGE_ERROR;
      String exceptionMessage = exceptionMessageMatcher.group(1);
      instructionResults.put(resultKey, prefix + translateExceptionMessage(exceptionMessage));
    } else {
      exceptions.addException(resultKey, resultString);
      instructionResults.put(resultKey, exceptionResult(resultKey));
    }
  }