use of org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor.ENGINE_ID in project neo4j by neo4j.
the class DbmsExtensionTest method checkCallbackSignature.
@Test
void checkCallbackSignature() {
Events testEvents = EngineTestKit.engine(ENGINE_ID).selectors(selectClass(DbmsExtensionCheckCallbackSignature.class)).execute().testEvents();
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(IllegalArgumentException.class), message(message -> message.contains("must return void")))));
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(IllegalArgumentException.class), message(message -> message.contains("must take one parameter that is assignable from")))));
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(IllegalArgumentException.class), message(message -> message.contains("cannot be found.")))));
}
use of org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor.ENGINE_ID in project neo4j by neo4j.
the class LifeExtensionTest method componentShutdownAfterTest.
@Test
void componentShutdownAfterTest() {
Events testEvents = EngineTestKit.engine(ENGINE_ID).selectors(selectClass(LifeExtensionComponentShutdownCase.class)).execute().testEvents();
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(RuntimeException.class), message(message -> message.contains("Shutdown exception.")))));
}
use of org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor.ENGINE_ID in project neo4j by neo4j.
the class TestInstanceValidationExtensionTest method nonInjectedFieldVerified.
@Test
void nonInjectedFieldVerified() {
Events testEvents = EngineTestKit.engine(ENGINE_ID).selectors(selectClass(InjectionIncorrectUsage.class)).execute().testEvents();
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(ExtensionConfigurationException.class), message(message -> message.contains("Field lifeSupport that is marked for injection")))));
}
use of org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor.ENGINE_ID in project neo4j by neo4j.
the class DefaultFileSystemExtensionTest method incorrectFileSystemExtensionUsage.
@Test
void incorrectFileSystemExtensionUsage() {
Events testEvents = EngineTestKit.engine(ENGINE_ID).selectors(selectClass(IncorrectFileSystemUsage.class)).execute().testEvents();
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(ExtensionConfigurationException.class), message(message -> message.contains("Field fileSystem that is marked for injection")))));
}
use of org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor.ENGINE_ID in project neo4j by neo4j.
the class DbmsExtensionTest method enforceAnnotation.
@Test
void enforceAnnotation() {
Events testEvents = EngineTestKit.engine(ENGINE_ID).selectors(selectClass(DbmsExtensionEnforceAnnotations.class)).execute().testEvents();
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(IllegalArgumentException.class), message(message -> message.contains("must be annotated")))));
}
Aggregations