use of org.junit.platform.fakes.TestEngineStub in project junit5 by junit-team.
the class LauncherConfigTests method preconditions.
@Test
void preconditions() {
assertThrows(PreconditionViolationException.class, () -> LauncherConfig.builder().addTestEngines((TestEngine[]) null));
assertThrows(PreconditionViolationException.class, () -> LauncherConfig.builder().addTestExecutionListeners((TestExecutionListener[]) null));
TestEngine engine = new TestEngineStub();
var listener = new TestExecutionListener() {
};
assertThrows(PreconditionViolationException.class, () -> LauncherConfig.builder().addTestEngines(engine, engine, null));
assertThrows(PreconditionViolationException.class, () -> LauncherConfig.builder().addTestExecutionListeners(listener, listener, null));
}
Aggregations