From daebef77d892755bdf4287ed5aa63aa0e1ab35ec Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Mon, 9 May 2011 20:15:17 +0200 Subject: Added test for reversed range selecting git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@190 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/TurnControlTest.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/jrummikub/control/TurnControlTest.java b/test/jrummikub/control/TurnControlTest.java index 97c39d0..6178ec4 100644 --- a/test/jrummikub/control/TurnControlTest.java +++ b/test/jrummikub/control/TurnControlTest.java @@ -366,6 +366,26 @@ public class TurnControlTest { assertCollection(Arrays.asList(stone1, stone2, stone3, stone4)); } + @Test + public void rangeSelectOnTableReverse() { + testControl.startTurn(); + + Stone stone1 = new Stone(1, StoneColor.RED); + 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)); + + mockTable.findStoneSet.put(stone1, set1); + mockTable.findStoneSet.put(stone3, set1); + + mockView.tablePanel.stoneClickEvent.emit(stone3, false); + mockView.tablePanel.rangeClickEvent.emit(stone1, true); + + assertCollection(Arrays.asList(stone1, stone2, stone3)); + + } + @Test public void rangeSelectOnTable() { testControl.startTurn(); -- cgit v1.2.3