use of com.oracle.bedrock.testsupport.junit.JUnitTestListener in project oracle-bedrock by coherence-community.
the class SimpleJUnitTestRunTest method shouldFireTestRunFinished.
@Test
public void shouldFireTestRunFinished() throws Exception {
JUnitTestListener listener1 = mock(JUnitTestListener.class, "1");
JUnitTestListener listener2 = mock(JUnitTestListener.class, "2");
JUnitTestListener.Event event = JUnitTestListener.Event.testRunFinsihed("foo", 1000);
fireEvent(event, listener1, listener2);
verify(listener1).testRunFinished(same(event));
verify(listener2).testRunFinished(same(event));
}
use of com.oracle.bedrock.testsupport.junit.JUnitTestListener in project oracle-bedrock by coherence-community.
the class SimpleJUnitTestRunTest method shouldFireTestFailure.
@Test
public void shouldFireTestFailure() throws Exception {
JUnitTestListener listener1 = mock(JUnitTestListener.class, "1");
JUnitTestListener listener2 = mock(JUnitTestListener.class, "2");
JUnitTestListener.Event event = JUnitTestListener.Event.failure("foo", "foo", 1000, null, null, null);
fireEvent(event, listener1, listener2);
verify(listener1).testFailed(same(event));
verify(listener2).testFailed(same(event));
}
use of com.oracle.bedrock.testsupport.junit.JUnitTestListener in project oracle-bedrock by coherence-community.
the class SimpleJUnitTestRunTest method shouldFireJUnitStartedEvent.
@Test
public void shouldFireJUnitStartedEvent() throws Exception {
JUnitTestListener listener1 = mock(JUnitTestListener.class, "1");
JUnitTestListener listener2 = mock(JUnitTestListener.class, "2");
JUnitTestListener.Event event = JUnitTestListener.Event.junitStarted();
fireEvent(event, listener1, listener2);
verify(listener1).junitStarted(same(event));
verify(listener2).junitStarted(same(event));
}
use of com.oracle.bedrock.testsupport.junit.JUnitTestListener in project oracle-bedrock by coherence-community.
the class SimpleJUnitTestRunTest method shouldFireTestError.
@Test
public void shouldFireTestError() throws Exception {
JUnitTestListener listener1 = mock(JUnitTestListener.class, "1");
JUnitTestListener listener2 = mock(JUnitTestListener.class, "2");
JUnitTestListener.Event event = JUnitTestListener.Event.error("foo", "foo", 1000, null, null, null);
fireEvent(event, listener1, listener2);
verify(listener1).testError(same(event));
verify(listener2).testError(same(event));
}
use of com.oracle.bedrock.testsupport.junit.JUnitTestListener in project oracle-bedrock by coherence-community.
the class SimpleJUnitTestRunTest method shouldFireTestSucceeded.
@Test
public void shouldFireTestSucceeded() throws Exception {
JUnitTestListener listener1 = mock(JUnitTestListener.class, "1");
JUnitTestListener listener2 = mock(JUnitTestListener.class, "2");
JUnitTestListener.Event event = JUnitTestListener.Event.testSucceded("foo", "foo", 1000);
fireEvent(event, listener1, listener2);
verify(listener1).testSucceeded(same(event));
verify(listener2).testSucceeded(same(event));
}
Aggregations