use of com.oracle.bedrock.testsupport.junit.MyOtherTest in project oracle-bedrock by coherence-community.
the class JUnitTest method shouldRunJUnitTestsWithClassExcludes.
@Test
public void shouldRunJUnitTestsWithClassExcludes() throws Exception {
SimpleJUnitTestListener listener = new SimpleJUnitTestListener();
try (JUnitTestRun jUnit = platform.launch(JUnitTestRun.class, listener.asOption(), TestClasses.of(JUnit4Test.class, MyOtherTest.class).exclude("(.)*MyOtherTest(.)*"))) {
jUnit.waitFor();
assertThat(listener.awaitCompletion(2, TimeUnit.MINUTES), is(true));
}
assertThat(listener.hasTestFailures(), is(true));
assertThat(listener.getTestCount(), is(3));
assertThat(listener.getErrorCount(), is(0));
assertThat(listener.getFailureCount(), is(1));
assertThat(listener.getSkipCount(), is(2));
}
Aggregations