summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-29 18:50:59 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-29 18:50:59 +0200
commitcb50f92edd8c66851fe402eaf8cd09cb598ee70c (patch)
tree73ee5a94fd403afd1bf72dad66dadde0da093a0e
parent699a0b0a2933237039b9b6ac545cc05a34644399 (diff)
downloadJRummikub-cb50f92edd8c66851fe402eaf8cd09cb598ee70c.tar
JRummikub-cb50f92edd8c66851fe402eaf8cd09cb598ee70c.zip
Test classify for more than two jokers
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@304 72836036-5685-4462-b002-a69064685172
-rw-r--r--test/jrummikub/model/StoneSetTest.java27
1 files changed, 25 insertions, 2 deletions
diff --git a/test/jrummikub/model/StoneSetTest.java b/test/jrummikub/model/StoneSetTest.java
index 4b83c94..a44818c 100644
--- a/test/jrummikub/model/StoneSetTest.java
+++ b/test/jrummikub/model/StoneSetTest.java
@@ -84,8 +84,8 @@ public class StoneSetTest {
public void runs() {
assertSet(RUN, 6, Arrays.asList(new Stone(1, RED), new Stone(2, RED),
new Stone(3, RED)));
- assertSet(RUN, 22, Arrays.asList(new Stone(4, BLUE), new Stone(5, BLUE),
- new Stone(6, BLUE), new Stone(7, BLUE)));
+ assertSet(RUN, 22, Arrays.asList(new Stone(4, BLUE),
+ new Stone(5, BLUE), new Stone(6, BLUE), new Stone(7, BLUE)));
}
/** */
@@ -158,6 +158,29 @@ public class StoneSetTest {
12, BLACK), new Stone(7, BLUE)));
}
+ /** */
+ @Test
+ public void manyJokersValid() {
+ assertSet(GROUP, 3 * 13, Arrays.asList(new Stone(RED),
+ new Stone(RED), new Stone(RED)));
+ assertSet(GROUP, 4 * 13, Arrays.asList(new Stone(RED),
+ new Stone(RED), new Stone(RED), new Stone(RED)));
+ assertSet(RUN, 5 * 11, Arrays.asList(new Stone(RED),
+ new Stone(RED), new Stone(RED), new Stone(RED), new Stone(RED)));
+ assertSet(RUN, 5 * 10, Arrays.asList(new Stone(RED),
+ new Stone(RED), new Stone(RED), new Stone(RED), new Stone(12, RED)));
+ }
+
+ /** */
+ @Test
+ public void manyJokersInvalid() {
+ List<Stone> stones = new ArrayList<Stone>();
+ for (int i = 0; i < 14; i++) {
+ stones.add(new Stone(RED));
+ }
+ assertSet(INVALID, 0, stones);
+ }
+
// invalid Split
/** */
@Test