Added Card tests.

This commit is contained in:
neviyn 2017-01-14 19:19:01 +00:00
parent 8c1f842557
commit f4c05a9e2f

View File

@ -0,0 +1,30 @@
package uk.co.neviyn.pokergame.model;
import org.junit.Test;
import static org.junit.Assert.*;
public class CardTest {
Card card = new Card(Suit.CLUBS, Value.ACE);
@Test
public void testGetName() throws Exception {
assertEquals(Value.ACE.toString() + " of " + Suit.CLUBS.toString(), card.getName());
}
@Test
public void testGetShortName() throws Exception {
assertEquals("" + Value.ACE.getValue() + Suit.CLUBS.getRepresentation(), card.getShortName());
}
@Test
public void testGetValue() throws Exception {
assertEquals(Value.ACE, card.getValue());
}
@Test
public void testGetSuit() throws Exception {
assertEquals(Suit.CLUBS, card.getSuit());
}
}