Search in sources :

Example 1 with JUnitTestListener

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));
}
Also used : JUnitTestListener(com.oracle.bedrock.testsupport.junit.JUnitTestListener) SimpleJUnitTestListener(com.oracle.bedrock.testsupport.junit.SimpleJUnitTestListener) Test(org.junit.Test)

Example 2 with JUnitTestListener

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));
}
Also used : JUnitTestListener(com.oracle.bedrock.testsupport.junit.JUnitTestListener) SimpleJUnitTestListener(com.oracle.bedrock.testsupport.junit.SimpleJUnitTestListener) Test(org.junit.Test)

Example 3 with JUnitTestListener

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));
}
Also used : JUnitTestListener(com.oracle.bedrock.testsupport.junit.JUnitTestListener) SimpleJUnitTestListener(com.oracle.bedrock.testsupport.junit.SimpleJUnitTestListener) Test(org.junit.Test)

Example 4 with JUnitTestListener

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));
}
Also used : JUnitTestListener(com.oracle.bedrock.testsupport.junit.JUnitTestListener) SimpleJUnitTestListener(com.oracle.bedrock.testsupport.junit.SimpleJUnitTestListener) Test(org.junit.Test)

Example 5 with JUnitTestListener

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));
}
Also used : JUnitTestListener(com.oracle.bedrock.testsupport.junit.JUnitTestListener) SimpleJUnitTestListener(com.oracle.bedrock.testsupport.junit.SimpleJUnitTestListener) Test(org.junit.Test)

Aggregations

JUnitTestListener (com.oracle.bedrock.testsupport.junit.JUnitTestListener)15 SimpleJUnitTestListener (com.oracle.bedrock.testsupport.junit.SimpleJUnitTestListener)14 Test (org.junit.Test)14 Option (com.oracle.bedrock.Option)3 OptionsByType (com.oracle.bedrock.OptionsByType)3 Platform (com.oracle.bedrock.runtime.Platform)1 RemoteEventListener (com.oracle.bedrock.runtime.concurrent.RemoteEventListener)1 JavaApplicationProcess (com.oracle.bedrock.runtime.java.JavaApplicationProcess)1 JUnitReporter (com.oracle.bedrock.testsupport.junit.JUnitReporter)1 SimpleJUnitTestRun (com.oracle.bedrock.testsupport.junit.SimpleJUnitTestRun)1