summaryrefslogtreecommitdiffstats
path: root/test/jrummikub
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-04-30 18:21:22 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-04-30 18:21:22 +0200
commitf9b396875add92f9cfc64ee74c82d3275e4d7dd6 (patch)
tree3097019f9f5384b6c7af4b6c5c3259b7ba39c418 /test/jrummikub
parent36da8c8a179faab8e52c66130c4031027e06db6b (diff)
downloadJRummikub-f9b396875add92f9cfc64ee74c82d3275e4d7dd6.tar
JRummikub-f9b396875add92f9cfc64ee74c82d3275e4d7dd6.zip
Made StoneSet iterable
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@31 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub')
-rw-r--r--test/jrummikub/model/StoneSetTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/jrummikub/model/StoneSetTest.java b/test/jrummikub/model/StoneSetTest.java
index c70dc59..259c788 100644
--- a/test/jrummikub/model/StoneSetTest.java
+++ b/test/jrummikub/model/StoneSetTest.java
@@ -63,4 +63,18 @@ public class StoneSetTest {
assertSame(testSet.get(2), joinedSet.get(2));
assertSame(secondSet.get(0), joinedSet.get(3));
}
+
+ //iterator
+ @Test
+ public void testIterator() {
+ StoneSet testSet = createTestSet();
+ int i = 0;
+
+ for(Stone stone : testSet) {
+ assertSame(stone,testSet.get(i));
+ i++;
+ }
+
+ assertEquals(i, testSet.size());
+ }
}