Example #1
0
 @SuppressWarnings("unchecked")
 private static <T extends Comparable<T>> void expectFail(Assertion assertion, T... args)
     throws Exception {
   try {
     Assertion.run(assertion, args);
   } catch (RuntimeException e) {
     return;
   }
   throw new Exception(
       "Expected "
           + Assertion.format(assertion, (Object[]) args)
           + " to throw a RuntimeException");
 }
Example #2
0
 @SuppressWarnings("unchecked")
 private static <T extends Comparable<T>> void expectPass(Assertion assertion, T... args)
     throws Exception {
   Assertion.run(assertion, args);
 }