summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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());
+ }
}