Skip to content

Instantly share code, notes, and snippets.

View ahrytsiuk's full-sized avatar

Andrii Hrytsiuk ahrytsiuk

View GitHub Profile
@ahrytsiuk
ahrytsiuk / BeforeAllForNestedTest.java
Created August 31, 2016 11:03
Code sample showing how to implement before all and after all callbacks for nested test classes.
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.*;
@Slf4j
public class OuterTest {
@BeforeAll
static void outerInitAll() {
log.info("OUTER: Initializing external resources...");
}
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<maven.compiler.showWarnings>true</maven.compiler.showWarnings>
</properties>

Keybase proof

I hereby claim:

  • I am ahrytsiuk on github.
  • I am ahrytsiuk (https://keybase.io/ahrytsiuk) on keybase.
  • I have a public key whose fingerprint is BC8B 8AA7 069B 558F 6FF1 A910 FB8A 6BE7 0176 2431

To claim this, I am signing this object: