Test case for SequenceIDIterator added.
[taxeditor.git] / eu.etaxonomy.taxeditor.molecular / src / test / java / eu / etaxonomy / taxeditor / molecular / io / SequenceIDIteratorTest.java
diff --git a/eu.etaxonomy.taxeditor.molecular/src/test/java/eu/etaxonomy/taxeditor/molecular/io/SequenceIDIteratorTest.java b/eu.etaxonomy.taxeditor.molecular/src/test/java/eu/etaxonomy/taxeditor/molecular/io/SequenceIDIteratorTest.java
new file mode 100644 (file)
index 0000000..23cf9f1
--- /dev/null
@@ -0,0 +1,41 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2016 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+package eu.etaxonomy.taxeditor.molecular.io;\r
+\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertFalse;\r
+import static org.junit.Assert.assertTrue;\r
+\r
+import org.junit.Test;\r
+\r
+\r
+\r
+/**\r
+ * @author bstoe_01\r
+ * @date 29.04.2016\r
+ *\r
+ */\r
+public class SequenceIDIteratorTest {\r
+    //TODO Why can't this class access SequenceIDIterator from here? (Workaround: Copy to molecular projekt to run test.)\r
+\r
+    @Test\r
+    public void test_next() {\r
+        SequenceIDIterator iterator = new SequenceIDIterator(3);\r
+\r
+        for (int i = 0; i < 3; i++) {\r
+            assertTrue(iterator.hasNext());\r
+            assertEquals("seqSingleRead" + i, iterator.next());\r
+        }\r
+        assertTrue(iterator.hasNext());\r
+        assertEquals("seqConsensus", iterator.next());\r
+        assertFalse(iterator.hasNext());\r
+    }\r
+}\r