public class SequenceOntologyTest
{
- private SequenceOntology so;
+ private SequenceOntologyI so;
@BeforeMethod
public void setUp() {
long now = System.currentTimeMillis();
- so = SequenceOntology.getInstance();
+ so = SequenceOntologyFactory.getInstance();
long elapsed = System.currentTimeMillis() - now;
System.out.println("Load and cache of Sequence Ontology took "
+ elapsed + "ms");
}
@Test(groups = "Functional")
- public void testIsProteinMatch()
- {
- assertTrue(so.isProteinMatch("protein_match"));
- assertTrue(so.isProteinMatch("protein_hmm_match"));
- assertFalse(so.isProteinMatch("Protein_match")); // case-sensitive
- }
-
- @Test(groups = "Functional")
- public void testIsNucleotideMatch()
- {
- assertTrue(so.isNucleotideMatch("nucleotide_match"));
- assertTrue(so.isNucleotideMatch("primer_match"));
- assertTrue(so.isNucleotideMatch("cross_genome_match"));
- assertTrue(so.isNucleotideMatch("expressed_sequence_match"));
- assertTrue(so.isNucleotideMatch("translated_nucleotide_match"));
- assertTrue(so.isNucleotideMatch("UST_match"));
- assertTrue(so.isNucleotideMatch("RST_match"));
- assertTrue(so.isNucleotideMatch("cDNA_match"));
- assertTrue(so.isNucleotideMatch("EST_match"));
- assertFalse(so.isNucleotideMatch("match")); // parent
- }
-
- @Test(groups = "Functional")
public void testIsCDS()
{
assertTrue(so.isA("CDS", "CDS"));