use of org.junit.platform.testkit.engine.Events in project neo4j by neo4j.
the class JUnitUsageGuardExtensionTest method detectIncorrectAssertUsage.
@Test
void detectIncorrectAssertUsage() {
Events testEvents = executeTest(IncorrectAssertUsage.class);
verifyFailureMessage(testEvents, "Detected Junit 4 classes: [org.junit.Assert]");
}
use of org.junit.platform.testkit.engine.Events in project neo4j by neo4j.
the class JUnitUsageGuardExtensionTest method detectIncorrectIgnoreNewTest.
@Test
void detectIncorrectIgnoreNewTest() {
Events testEvents = executeTest(IgnoreNewTestWithOldAnnotation.class);
verifyFailureMessage(testEvents, "Detected Junit 4 classes: [org.junit.Ignore]");
}
use of org.junit.platform.testkit.engine.Events 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.platform.testkit.engine.Events 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")))));
}
use of org.junit.platform.testkit.engine.Events in project neo4j by neo4j.
the class LifeExtensionTest method incorrectLifeSupportExtensionUsageTest.
@Test
void incorrectLifeSupportExtensionUsageTest() {
Events testEvents = EngineTestKit.engine(ENGINE_ID).selectors(selectClass(LifeExtensionIncorrectUsage.class)).execute().testEvents();
testEvents.assertThatEvents().haveExactly(1, event(finishedWithFailure(instanceOf(ExtensionConfigurationException.class), message(message -> message.contains("Field lifeSupport that is marked for injection")))));
}
Aggregations