Project

General

Profile

« Previous | Next » 

Revision 3b957453

Added by Ben Stöver over 7 years ago

Test case for SequenceIDIterator added.

View differences:

.gitattributes
1991 1991
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/CDMSequenceMatrixAdapter.java -text
1992 1992
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/ExportSingleReadAlignmentWizardPage.java -text
1993 1993
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/SequenceIDIterator.java -text
1994
eu.etaxonomy.taxeditor.molecular/src/test/java/eu/etaxonomy/taxeditor/molecular/io/SequenceIDIteratorTest.java -text
1994 1995
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product merge=ours
1995 1996
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre merge=ours
eu.etaxonomy.taxeditor.molecular/.classpath
3 3
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
4 4
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5 5
	<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
6
	<classpathentry kind="src" path="src/test/java"/>
6 7
	<classpathentry kind="output" path="target/classes"/>
7 8
</classpath>
eu.etaxonomy.taxeditor.molecular/.gitignore
6 6
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/.directory
7 7
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/hibernate.log
8 8
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/.settings
9
!src/test/java/eu/etaxonomy/taxeditor/molecular/io/.project
10
!src/test/java/eu/etaxonomy/taxeditor/molecular/io/integration-test.log
11
!src/test/java/eu/etaxonomy/taxeditor/molecular/io/target
12
!src/test/java/eu/etaxonomy/taxeditor/molecular/io/.directory
13
!src/test/java/eu/etaxonomy/taxeditor/molecular/io/hibernate.log
14
!src/test/java/eu/etaxonomy/taxeditor/molecular/io/.settings
15
!src/test/java/eu/etaxonomy/taxeditor/molecular/.project
16
!src/test/java/eu/etaxonomy/taxeditor/molecular/integration-test.log
17
!src/test/java/eu/etaxonomy/taxeditor/molecular/target
18
!src/test/java/eu/etaxonomy/taxeditor/molecular/.directory
19
!src/test/java/eu/etaxonomy/taxeditor/molecular/hibernate.log
20
!src/test/java/eu/etaxonomy/taxeditor/molecular/.settings
21
!src/test/java/eu/etaxonomy/taxeditor/.project
22
!src/test/java/eu/etaxonomy/taxeditor/integration-test.log
23
!src/test/java/eu/etaxonomy/taxeditor/target
24
!src/test/java/eu/etaxonomy/taxeditor/.directory
25
!src/test/java/eu/etaxonomy/taxeditor/hibernate.log
26
!src/test/java/eu/etaxonomy/taxeditor/.settings
27
!src/test/java/eu/etaxonomy/.project
28
!src/test/java/eu/etaxonomy/integration-test.log
29
!src/test/java/eu/etaxonomy/target
30
!src/test/java/eu/etaxonomy/.directory
31
!src/test/java/eu/etaxonomy/hibernate.log
32
!src/test/java/eu/etaxonomy/.settings
33
!src/test/java/eu/.project
34
!src/test/java/eu/integration-test.log
35
!src/test/java/eu/target
36
!src/test/java/eu/.directory
37
!src/test/java/eu/hibernate.log
38
!src/test/java/eu/.settings
39
!src/test/java/.project
40
!src/test/java/integration-test.log
41
!src/test/java/target
42
!src/test/java/.directory
43
!src/test/java/hibernate.log
44
!src/test/java/.settings
45
!src/test/.project
46
!src/test/integration-test.log
47
!src/test/target
48
!src/test/.directory
49
!src/test/hibernate.log
50
!src/test/.settings
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/SequenceIDIterator.java
20 20
 * @author Ben Stöver
21 21
 * @date 29.04.2016
22 22
 */
23
public class SequenceIDIterator implements Iterator<String> {
23
class SequenceIDIterator implements Iterator<String> {
24 24
    private int singleReadPos;
25 25
    private int singleReadCount;
26 26

  
eu.etaxonomy.taxeditor.molecular/src/test/java/eu/etaxonomy/taxeditor/molecular/io/SequenceIDIteratorTest.java
1
// $Id$
2
/**
3
* Copyright (C) 2016 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.taxeditor.molecular.io;
11

  
12

  
13
import static org.junit.Assert.assertEquals;
14
import static org.junit.Assert.assertFalse;
15
import static org.junit.Assert.assertTrue;
16

  
17
import org.junit.Test;
18

  
19

  
20

  
21
/**
22
 * @author bstoe_01
23
 * @date 29.04.2016
24
 *
25
 */
26
public class SequenceIDIteratorTest {
27
    //TODO Why can't this class access SequenceIDIterator from here? (Workaround: Copy to molecular projekt to run test.)
28

  
29
    @Test
30
    public void test_next() {
31
        SequenceIDIterator iterator = new SequenceIDIterator(3);
32

  
33
        for (int i = 0; i < 3; i++) {
34
            assertTrue(iterator.hasNext());
35
            assertEquals("seqSingleRead" + i, iterator.next());
36
        }
37
        assertTrue(iterator.hasNext());
38
        assertEquals("seqConsensus", iterator.next());
39
        assertFalse(iterator.hasNext());
40
    }
41
}

Also available in: Unified diff