Skip to content

Commit 91f4e4c

Browse files
committed
Strand unit test, taxonomyID unit test
1 parent 76c3bd4 commit 91f4e4c

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

biojava-core/src/main/java/org/biojava/nbio/core/sequence/TaxonomyID.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
public class TaxonomyID {
3232
//TODO this should implement equals and hashcode if is value object?
3333

34-
3534
private String id = null;
3635
DataSource dataSource = DataSource.UNKNOWN;
3736

3837
public TaxonomyID(String id, DataSource dataSource) {
38+
// TODO should throw IAE if null args?
3939
this.id = id;
4040
this.dataSource = dataSource;
4141
}

biojava-core/src/test/java/org/biojava/nbio/core/sequence/StrandTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void stringRepresentation() {
1919
assertEquals("-", Strand.NEGATIVE.getStringRepresentation());
2020
assertEquals(".", Strand.UNDEFINED.getStringRepresentation());
2121
}
22-
22+
2323
@Test
2424
void numberRepresentation() {
2525
assertEquals(1, Strand.POSITIVE.getNumericRepresentation());
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.biojava.nbio.core.sequence;
2+
3+
import org.junit.jupiter.api.Test;
4+
5+
import static org.junit.jupiter.api.Assertions.*;
6+
7+
class TaxonomyIDTest {
8+
9+
@Test
10+
void createTaxonomyID(){
11+
TaxonomyID tId = new TaxonomyID("abc1", DataSource.GENBANK);
12+
assertEquals("abc1", tId.getID());
13+
assertEquals(DataSource.GENBANK, tId.getDataSource());
14+
}
15+
16+
}

0 commit comments

Comments
 (0)