Project

General

Profile

Download (1.31 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2016 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.molecular.io;
10

    
11
import static org.junit.Assert.assertEquals;
12
import static org.junit.Assert.assertFalse;
13
import static org.junit.Assert.assertTrue;
14

    
15
import org.junit.Test;
16

    
17
/**
18
 * @author Ben Stöver
19
 * @date 29.04.2016
20
 */
21
public class SequenceIDIteratorTest {
22
    @Test
23
    public void test_next() {
24
        SequenceIDIterator iterator = new SequenceIDIterator(3, true);
25

    
26
        for (int i = 0; i < 3; i++) {
27
            assertTrue(iterator.hasNext());
28
            assertEquals("seqSingleRead" + i, iterator.next());
29
        }
30
        assertTrue(iterator.hasNext());
31
        assertEquals("seqConsensus", iterator.next());
32
        assertFalse(iterator.hasNext());
33
    }
34

    
35

    
36
    @Test
37
    public void test_next_woConsensus() {
38
        SequenceIDIterator iterator = new SequenceIDIterator(3, false);
39

    
40
        for (int i = 0; i < 3; i++) {
41
            assertTrue(iterator.hasNext());
42
            assertEquals("seqSingleRead" + i, iterator.next());
43
        }
44
        assertFalse(iterator.hasNext());
45
    }
46
}
    (1-1/1)