What, why and how?
JUnit 5 = JUnit Platform + JUnit Jupiter + JUnit Vintage
https://github.com/sormuras/junit5-there-is-no-junit5
https://github.com/sormuras/junit5-there-is-no-junit5
https://github.com/sormuras/junit5-there-is-no-junit5
https://github.com/sormuras/junit5-there-is-no-junit5
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
import static org.junit.jupiter.api.Assertions.assertEquals;
import example.util.Calculator;
import org.junit.jupiter.api.Test;
class MyFirstJUnitJupiterTests {
private final Calculator calculator = new Calculator();
@Test
void addition() {
assertEquals(2, calculator.add(1, 1));
}
}