JUnit Test
parent
92c854e0aa
commit
7d804ee163
8
pom.xml
8
pom.xml
|
|
@ -13,5 +13,13 @@
|
|||
<maven.compiler.target>23</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.example.Objekte;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class KarteTest {
|
||||
|
||||
private static Karte karte;
|
||||
|
||||
@BeforeAll
|
||||
static void setUp() {
|
||||
karte = new Karte("♠", "A");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testToString() {
|
||||
assertEquals("♠ A", karte.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getPunkte() {
|
||||
assertEquals(11, karte.getPunkte());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue