BlackJack/tests/KarteTest.java

15 lines
535 B
Java
Raw Normal View History

2024-03-25 16:55:41 +01:00
import static org.junit.jupiter.api.Assertions.*;
class KarteTest {
@org.junit.jupiter.api.Test
void getPunkte() {
String[] successTestList = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Bube", "Dame", "König", "Ass"};
int[] successResultList = {2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11};
for (int i = 0; i < successTestList.length; i++){
Karte testKarte = new Karte("Herz", successTestList[i]);
assertEquals(successResultList[i], testKarte.getWert());
2024-03-25 16:55:41 +01:00
}
}
}