junit
commands
java
import static org.junit.jupiter.api.Assertions.assertThrows;
@Test
void exceptionTesting() {
MyException thrown = assertThrows(
MyException.class,
() -> myObject.doThing(),
"Expected doThing() to throw, but it didn't"
);
assertTrue(thrown.getMessage().contains("Stuff"));
}
@Override
public void beforeAll(ExtensionContext context) throws Exception {
final Store store = context
.getRoot()
.getStore(ExtensionContext.Namespace.GLOBAL);
if (store.get(EmbeddedPostgres.class.getName(), EmbeddedPostgres.class) == null) {
store.put(EmbeddedPostgres.class.getName(), new EmbeddedPostgres())
}
}
@Test
void mustCreatePostUsingFormPage(@TempDir Path tempDir) {
final var tmpPhoto = Files.createTempFile(tempDir, "img", "png");
awesome junit 5, junit 5 commands, junit commands, junit bookmarks
metadata={"id": 679, "createdAt": "2020-05-14 01:17:14.370874", "updatedAt": "2023-03-11 15:29:02.812749"}