View: Refactor bottom panel display
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@354 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
03b3bf2340
commit
bc04d21afb
10 changed files with 122 additions and 186 deletions
|
@ -1,12 +1,7 @@
|
|||
package jrummikub.control.turn;
|
||||
|
||||
import static jrummikub.model.StoneColor.BLACK;
|
||||
import static jrummikub.model.StoneColor.BLUE;
|
||||
import static jrummikub.model.StoneColor.RED;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static jrummikub.model.StoneColor.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -32,6 +27,7 @@ import jrummikub.util.Event;
|
|||
import jrummikub.util.IEvent;
|
||||
import jrummikub.util.IListener;
|
||||
import jrummikub.util.Pair;
|
||||
import jrummikub.view.IView.BottomPanelType;
|
||||
import jrummikub.view.MockView;
|
||||
|
||||
import org.junit.Before;
|
||||
|
@ -130,7 +126,7 @@ public class TurnControlTest {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void showInitialHand() {
|
||||
mockView.displayStartTurnPanel = true;
|
||||
mockView.bottomPanelType = BottomPanelType.START_TURN_PANEL;
|
||||
|
||||
List<Pair<Stone, Position>> stones = Arrays.asList(
|
||||
new Pair<Stone, Position>(new Stone(RED), new Position(0, 0)),
|
||||
|
@ -150,7 +146,7 @@ public class TurnControlTest {
|
|||
}
|
||||
assertEquals(stones.size(), i);
|
||||
|
||||
assertFalse(mockView.displayStartTurnPanel);
|
||||
assertSame(BottomPanelType.HUMAN_HAND_PANEL, mockView.bottomPanelType);
|
||||
}
|
||||
|
||||
/** */
|
||||
|
|
Reference in a new issue