From 6e9c1b539b412dc08716eb3f88adb53b3021a27b Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Wed, 4 May 2011 19:09:39 +0200 Subject: =?UTF-8?q?Test=20f=C3=BCr=20Austeilen=20geschrieben,=20eine=20Men?= =?UTF-8?q?ge=20getSize=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@116 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/RoundControlTest.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/jrummikub/control/RoundControlTest.java (limited to 'test/jrummikub/control') diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java new file mode 100644 index 0000000..2e6a7d0 --- /dev/null +++ b/test/jrummikub/control/RoundControlTest.java @@ -0,0 +1,24 @@ +package jrummikub.control; + +import static org.junit.Assert.*; +import jrummikub.model.GameState; +import jrummikub.view.MockView; + +import org.junit.Test; + +public class RoundControlTest { + + @Test + public void testDeal() { + MockView view = new MockView(); + GameState testGameState = new GameState(); + RoundControl testRound = new RoundControl(testGameState, view); + testRound.deal(); + assertEquals(106 - testGameState.getPlayerCount() * 14, testGameState + .getGameHeap().getSize()); + for (int i = 0; i < testGameState.getPlayerCount(); i++) { + assertEquals(14, testGameState.getPlayer(i).getHand().getSize()); + } + } + +} -- cgit v1.2.3