コード例 #1
0
 public static void assertTestCase(TestCase expected, TestCase actual) {
   assertEquals(
       "test case '" + expected.getName() + "' name should be " + expected.getName(),
       expected.getName(),
       actual.getName());
   assertEquals(
       "test case '" + expected.getName() + "' status should be " + expected.getStatus(),
       expected.getStatus(),
       actual.getStatus());
   assertEquals(
       "test case '"
           + expected.getName()
           + "' duration should be '"
           + expected.getDuration()
           + "'",
       expected.getDuration(),
       actual.getDuration());
   assertEquals(
       "test case '" + expected.getName() + "' message should be '" + expected.getMessage() + "'",
       expected.getMessage(),
       actual.getMessage());
   assertEquals(
       "test case '"
           + expected.getName()
           + "' stacktrace should be '"
           + expected.getStackTrace()
           + "'",
       expected.getStackTrace(),
       actual.getStackTrace());
 }
コード例 #2
0
 @Override
 public int compare(TestCase o1, TestCase o2) {
   return o1.getName().compareTo(o2.getName());
 }