From cb50f92edd8c66851fe402eaf8cd09cb598ee70c Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Sun, 29 May 2011 18:50:59 +0200 Subject: Test classify for more than two jokers git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@304 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/model/StoneSetTest.java | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'test/jrummikub') 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 stones = new ArrayList(); + for (int i = 0; i < 14; i++) { + stones.add(new Stone(RED)); + } + assertSet(INVALID, 0, stones); + } + // invalid Split /** */ @Test -- cgit v1.2.3