示例#1
0
 public void assertEventsReceived(TestState... expectedTypes) {
   ArrayList<TestState> actualTypes = new ArrayList<TestState>();
   for (TestEvent event : testEvents) {
     actualTypes.add(event.getType());
   }
   assertEquals(asList(expectedTypes), actualTypes);
 }
示例#2
0
 public void assertStatesChanged(CoreStatus... expectedStates) {
   ArrayList<CoreStatus> actualStates = new ArrayList<CoreStatus>();
   for (PropertyChangeEvent event : propertyEvents) {
     actualStates.add((CoreStatus) event.getNewValue());
   }
   assertEquals(asList(expectedStates), actualStates);
 }
示例#3
0
 public void assertTestsStarted(String... testNames) {
   // Also asserts the order
   List<String> startedTests = new ArrayList<String>();
   for (TestEvent event : testEvents) {
     if (event.getType().equals(TEST_CASE_STARTING)) {
       startedTests.add(event.getTestName());
     }
   }
   assertEquals(asList(testNames), startedTests);
 }