Skip to content

Instantly share code, notes, and snippets.

@beyondxscratch
Created July 14, 2022 22:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save beyondxscratch/9255a2d3f11bf267bd3b4bc442305116 to your computer and use it in GitHub Desktop.
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.*;
@ExtendWith(MyIntegrationTestExtension.class)
class MyIntegrationTests {
@Test
void test() {
// ...
}
}
class MyIntegrationTestExtension implements BeforeAllCallback, AfterAllCallback {
@Override
public void beforeAll(ExtensionContext context) {
// Préparation du contexte de test
}
@Override
public void afterAll(ExtensionContext context) {
// Destruction du contexte de test
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment