File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
main/java/org/biojava/nbio/core/sequence
test/java/org/biojava/nbio/core/sequence Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 3131public 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 }
Original file line number Diff line number Diff 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 ());
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments