From 82c58a1eae3c818274db1b29c5d539f174060835 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Sun, 8 May 2011 18:10:07 +0200 Subject: getPlayer entfernt, weil es getNthNextPlayer gibt. Warnings beseitigt. git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@170 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/RoundControlTest.java | 3 +- test/jrummikub/control/TurnControlTest.java | 42 +++++++++++++++++++--------- 2 files changed, 30 insertions(+), 15 deletions(-) (limited to 'test') diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java index 159df9d..9569fbd 100644 --- a/test/jrummikub/control/RoundControlTest.java +++ b/test/jrummikub/control/RoundControlTest.java @@ -6,7 +6,6 @@ import static jrummikub.model.StoneColor.RED; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; @@ -50,7 +49,7 @@ public class RoundControlTest { - testGameState.table.getSize(), testGameState.getGameHeap() .getSize()); for (int i = 0; i < testGameState.getPlayerCount(); i++) { - assertEquals(14, testGameState.getPlayer(i).getHand().getSize()); + assertEquals(14, testGameState.getNthNextPlayer(i).getHand().getSize()); } } diff --git a/test/jrummikub/control/TurnControlTest.java b/test/jrummikub/control/TurnControlTest.java index 27d9aec..da8c83f 100644 --- a/test/jrummikub/control/TurnControlTest.java +++ b/test/jrummikub/control/TurnControlTest.java @@ -78,14 +78,15 @@ public class TurnControlTest { mockView.displayStartTurnPanel = true; - List> stones = Arrays.asList( - new Pair(new Stone(RED), new Position(0, 0)), - new Pair(new Stone(BLACK), new Position(1, 0))); + List> stones = Arrays + .asList(new Pair(new Stone(RED), new Position( + 0, 0)), new Pair(new Stone(BLACK), + new Position(1, 0))); mockHand.iterable = stones; testControl = new TurnControl(mockHand, mockTable, mockView, mockTimer); - + testControl.startTurn(); int i = 0; @@ -118,7 +119,6 @@ public class TurnControlTest { assertTrue(mockView.playerPanel.endTurnEvent.listeners.isEmpty()); } - @Test public void timerEndOfTurn() { eventFired = false; @@ -146,11 +146,10 @@ public class TurnControlTest { // Select first stone mockView.playerPanel.handPanel.stoneClickEvent.emit(firstStone, false); mockTimer.timeRunOutEvent.emit(); - + assertCollection(new ArrayList()); } - @Test public void selectStoneInHand() { @@ -199,8 +198,8 @@ public class TurnControlTest { mockView.playerPanel.handPanel.stoneClickEvent.emit(firstStone, true); mockView.playerPanel.handPanel.stoneClickEvent.emit(secondStone, true); - mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(firstStone, - false); + mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit( + firstStone, false); assertCollection(Arrays.asList(secondStone)); } @@ -214,8 +213,8 @@ public class TurnControlTest { mockView.playerPanel.handPanel.stoneClickEvent.emit(firstStone, true); mockView.playerPanel.handPanel.stoneClickEvent.emit(secondStone, true); - mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit(firstStone, - true); + mockView.tablePanel.stoneCollectionPanel.stoneClickEvent.emit( + firstStone, true); assertCollection(Arrays.asList(secondStone, firstStone)); } @@ -320,7 +319,8 @@ public class TurnControlTest { Stone stone2 = new Stone(2, StoneColor.RED); Stone stone3 = new Stone(3, StoneColor.RED); Stone stone4 = new Stone(4, StoneColor.RED); - StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2, stone3, stone4)); + StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2, stone3, + stone4)); mockTable.findStoneSet.put(stone1, set1); mockTable.findStoneSet.put(stone3, set1); @@ -340,7 +340,8 @@ public class TurnControlTest { Stone stone2 = new Stone(2, StoneColor.RED); Stone stone3 = new Stone(3, StoneColor.RED); Stone stone4 = new Stone(4, StoneColor.RED); - StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2, stone3, stone4)); + StoneSet set1 = new StoneSet(Arrays.asList(stone1, stone2, stone3, + stone4)); mockTable.findStoneSet.put(stone1, set1); mockTable.findStoneSet.put(stone3, set1); @@ -402,4 +403,19 @@ public class TurnControlTest { ArrayList expectedStones = new ArrayList(expected); assertEquals(expectedStones, selectedStones); } + + @Test + public void takeLeftStone() { + + } + + @Test + public void takeRightStone() { + + } + + @Test + public void takeMiddleStone() { + + } } -- cgit v1.2.3