public void assertEventsReceived(TestState... expectedTypes) { ArrayList<TestState> actualTypes = new ArrayList<TestState>(); for (TestEvent event : testEvents) { actualTypes.add(event.getType()); } assertEquals(asList(expectedTypes), actualTypes); }
public void assertStatesChanged(CoreStatus... expectedStates) { ArrayList<CoreStatus> actualStates = new ArrayList<CoreStatus>(); for (PropertyChangeEvent event : propertyEvents) { actualStates.add((CoreStatus) event.getNewValue()); } assertEquals(asList(expectedStates), actualStates); }
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); }