diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-09 20:15:17 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-09 20:15:17 +0200 |
commit | daebef77d892755bdf4287ed5aa63aa0e1ab35ec (patch) | |
tree | df4cd643167f8ff4c7ba8d0915f7fafba15719e3 /test/jrummikub | |
parent | 3f8853b3e68c19af3281a6b02ce361956f406953 (diff) | |
download | JRummikub-daebef77d892755bdf4287ed5aa63aa0e1ab35ec.tar JRummikub-daebef77d892755bdf4287ed5aa63aa0e1ab35ec.zip |
Added test for reversed range selecting
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@190 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub')
-rw-r--r-- | test/jrummikub/control/TurnControlTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
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 @@ -367,6 +367,26 @@ public class TurnControlTest { } @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(); |