Skip to content
Snippets Groups Projects
Commit 19dcb00a authored by Scott Langum Du Plessis's avatar Scott Langum Du Plessis
Browse files

Added tests fir deckOFCards class

parent 730e1eaf
No related branches found
No related tags found
1 merge request!4Add unit tests
package edu.ntnu.stud.cardgame;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class DeckOfCardsTest {
DeckOfCards deck;
@BeforeEach
void setDeck() {
deck = new DeckOfCards();
}
@Nested
public class PositiveTests{
@Test
void testDeckFiller(){
assertEquals(deck.getDeck().size(), 52);
assertTrue(deck.getDeck().contains(new PlayingCard('H', 10)));
assertTrue(deck.getDeck().contains(new PlayingCard('D', 1)));
assertTrue(deck.getDeck().contains(new PlayingCard('C', 5)));
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment