bugfixes and a few tests

This commit is contained in:
2022-09-15 22:36:03 +02:00
parent fef09ea000
commit 8fa74d70d7
10 changed files with 149 additions and 26 deletions

View File

@@ -1,2 +1,32 @@
package mau.mau;public class CardTest {
package mau.mau;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class CardTest {
@Test
public void isAceOfSpadesPrintedCorrectlyTest() {
//Assign
Card card = new Card(TYPENUM.SPADES, VALUENUM.ACE);
//Act
String result = card.toString();
//Assert
assertEquals("SPADES ACE", result);
}
@Test
public void isJokerPrintedCorrectlyTest() {
//Assign
Card card = new Card(TYPENUM.JOKER, VALUENUM.TWO);
//Act
String result = card.toString();
//Assert
assertEquals("JOKER", result);
}
}

View File

@@ -1,2 +1,21 @@
package mau.mau;public class DealerTest {
package mau.mau;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class DealerTest {
@Test
public void isDealerAGoodShufflerTest() {
//Assign
Deck deck = new Deck();
Dealer sut = new Dealer(deck);
//Act
// sut.shuffleDeck();
//Assert
assertTrue(false);
}
}

View File

@@ -1,2 +1,4 @@
package mau.mau;public class DeckTest {
package mau.mau;
public class DeckTest {
}

View File

@@ -0,0 +1,17 @@
Bot
Human
Player
~~Card~~
Dealer
Deck
Game
~~Referee~~
Utils