diff options
Diffstat (limited to 'test')
-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(); |