diff options
Diffstat (limited to 'test/jrummikub/model')
-rw-r--r-- | test/jrummikub/model/TableTest.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/jrummikub/model/TableTest.java b/test/jrummikub/model/TableTest.java index e113ba7..a806e14 100644 --- a/test/jrummikub/model/TableTest.java +++ b/test/jrummikub/model/TableTest.java @@ -67,13 +67,24 @@ public class TableTest { } @Test - public void testPickNonexistentStone() { + public void testPickStoneFromEmptyTable() { Stone targetStone = new Stone(BLACK); testTable.pickUpStone(targetStone); assertEquals(0, testTable.getSize()); } @Test + public void testPickNonexistentStone() { + Stone targetStone = new Stone(BLACK); + Stone droppedStone = new Stone(RED); + StoneSet set = new StoneSet(droppedStone); + testTable.drop(set, new Position(0, 0)); + testTable.pickUpStone(targetStone); + assertEquals(1, testTable.getSize()); + assertSame(testTable.findStoneSet(droppedStone), set); + } + + @Test @SuppressWarnings("unused") public void testPickUpStoneRun() { Stone targetStone = new Stone(BLACK); |