Added Card tests.
This commit is contained in:
parent
8c1f842557
commit
f4c05a9e2f
30
src/test/java/uk/co/neviyn/pokergame/model/CardTest.java
Normal file
30
src/test/java/uk/co/neviyn/pokergame/model/CardTest.java
Normal 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());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user