Test går att köra via kommando mvn test
.
CalculatorTest.java innehåller (m.m.)
- @Test
- @DisplayName
- @Disabled
- AssertEquals
- AssertTrue
TextProcessorTest.java innehåller (m.m.)
- @RepeatedTest
- @BeforeEach
- @AfterEach
- AssertNotNull
pom.xml
// Inkluderas för att köra @ParameterizedTest
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
// För att kunna köra 'mvn test' kommando
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>