From db7489a5c78551e4db52acd11656f2b872740f89 Mon Sep 17 00:00:00 2001 From: Bennet Gerlach Date: Wed, 4 May 2011 23:14:10 +0200 Subject: New main git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@127 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/TurnControlTest.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'test/jrummikub/control') diff --git a/test/jrummikub/control/TurnControlTest.java b/test/jrummikub/control/TurnControlTest.java index 8c58352..8a2416f 100644 --- a/test/jrummikub/control/TurnControlTest.java +++ b/test/jrummikub/control/TurnControlTest.java @@ -21,7 +21,7 @@ import org.junit.Test; public class TurnControlTest { class MockTimer implements ITurnTimer { - public boolean timerRunning; + public boolean timerRunning = false; public Event timeRunOutEvent = new Event(); @Override @@ -55,6 +55,11 @@ public class TurnControlTest { testControl = new TurnControl(null, mockTable, mockView, mockTimer); } + @Test + public void startTimer() { + assertTrue(mockTimer.timerRunning); + } + @Test public void viewEndOfTurn() { eventFired = false; @@ -141,8 +146,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)); } @@ -156,8 +161,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)); } @@ -262,8 +267,7 @@ 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); @@ -283,8 +287,7 @@ 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); -- cgit v1.2.3