I've been trying to run JUnit 5 tests with Maven Surefire. However, it doesn't seem like Surefire is running any tests at all, even though I do have some, and in the default directory, too.
This is the console output I'm getting: https://prnt.sc/ugo1xt
Here are the relevant parts of the pom.xml:
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.7.0-M1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
</plugins>
</build>
The surefire version is 3.0.0-M4.
I've tried pretty much any fix I could find on Google, although most of them seemed to be outdated. Any help would be greatly appreciated.
Cheers!
EDIT: Here's an example of my tests:
package bankprojekt;
import bankprojekt.verarbeitung.*;
import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.*;
public class GirokontoTest {
Girokonto gk;
@BeforeEach
void setup(){
gk = new Girokonto();
gk.einzahlen(500);
}
@AfterEach
void teardown(){
gk = null;
}
@Test
void abhebenMitWaehrungswechsel(){
try{
gk.abheben(195.583, Waehrung.BGN);
}
catch (Exception e) {
System.out.println(e);
}
assertEquals(400, gk.getKontostand());
}
@Test
void einzahlenMitWaehrungswechsel(){
gk.einzahlen(195.583, Waehrung.BGN);
assertEquals(600, gk.getKontostand());
}
}