Another fix for the Table pickUpStone method

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@179 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Matthias Schiffer 2011-05-09 00:33:31 +02:00
parent b57a2d5090
commit b9fbe279c3
2 changed files with 22 additions and 4 deletions

View file

@ -67,12 +67,23 @@ 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() {