Esempio n. 1
0
 @Override
 public void assertIsSatisfied(ResultSummary rs, FailFastException ffe) {
   if (rs.getFailureCount() + rs.getExceptionCount() == 0) {
     throw new ConcordionAssertionError(
         "Specification is expected to fail but has neither failures nor exceptions.", rs);
   }
 }
Esempio n. 2
0
 @Override
 public void assertIsSatisfied(ResultSummary rs, FailFastException ffe) {
   if (ffe != null) {
     throw ffe;
   }
   if (rs.getFailureCount() > 0) {
     throw new ConcordionAssertionError(
         "Specification has failure(s). See output HTML for details.", rs);
   }
   if (rs.getExceptionCount() > 0) {
     throw new ConcordionAssertionError(
         "Specification has exception(s). See output HTML for details.", rs);
   }
 }
Esempio n. 3
0
 @Override
 public void assertIsSatisfied(ResultSummary rs, FailFastException ffe) {
   List<String> list = new ArrayList<String>();
   addToList(list, rs.getSuccessCount(), "a success", "some successes");
   addToList(list, rs.getFailureCount(), "a failure", "some failures");
   addToList(list, rs.getExceptionCount(), "an exception", "some exceptions");
   if (list.size() > 0) {
     String s = list.get(0);
     if (list.size() > 1) {
       for (int i = 1; i < (list.size() - 1); i++) {
         s += ", " + list.get(i);
       }
       s += ", and " + list.get(list.size() - 1);
     }
     throw new ConcordionAssertionError(
         "Specification is supposed to be unimplemented, but is reporting " + s + ".", rs);
   }
 }
 public long getExceptionCount() {
   return resultSummary.getExceptionCount();
 }