X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Fensembl%2FEnsemblSeqProxyTest.java;h=27008f5581fb83569c3bfdacda77ab87e0dc4549;hb=55ebdfcc6bd979605c9bb2b4092a422b035bc27e;hp=69b2ad48a75b9c681b737e30c1078f468999fa3c;hpb=f59dd9efbb3dfc313ab0b0507832e21cd0076fe1;p=jalview.git diff --git a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java index 69b2ad4..27008f5 100644 --- a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java +++ b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java @@ -139,13 +139,13 @@ public class EnsemblSeqProxyTest @BeforeClass(alwaysRun = true) public void setUp() { - SequenceOntologyFactory.setInstance(new SequenceOntologyLite()); + SequenceOntologyFactory.setSequenceOntology(new SequenceOntologyLite()); } @AfterClass(alwaysRun = true) public void tearDown() { - SequenceOntologyFactory.setInstance(null); + SequenceOntologyFactory.setSequenceOntology(null); } @DataProvider(name = "ens_seqs") @@ -234,30 +234,4 @@ public class EnsemblSeqProxyTest // verify attributes string is updated with reverse complement assertEquals("x=y,z;alleles=" + revcomp + ";a=b,c", sf.getAttributes()); } - - @Test(groups = "Functional") - public void testSortFeatures() - { - SequenceFeature sf1 = new SequenceFeature("", "", 10, 15, 0f, null); - SequenceFeature sf2 = new SequenceFeature("", "", 8, 12, 0f, null); - SequenceFeature sf3 = new SequenceFeature("", "", 8, 13, 0f, null); - SequenceFeature sf4 = new SequenceFeature("", "", 11, 11, 0f, null); - List sfs = Arrays.asList(new SequenceFeature[] { sf1, - sf2, sf3, sf4 }); - - // sort by start position ascending (forward strand) - // sf2 and sf3 tie and should not be reordered by sorting - SequenceFeatures.sortFeatures(sfs, true); - assertSame(sfs.get(0), sf2); - assertSame(sfs.get(1), sf3); - assertSame(sfs.get(2), sf1); - assertSame(sfs.get(3), sf4); - - // sort by end position descending (reverse strand) - SequenceFeatures.sortFeatures(sfs, false); - assertSame(sfs.get(0), sf1); - assertSame(sfs.get(1), sf3); - assertSame(sfs.get(2), sf2); - assertSame(sfs.get(3), sf4); - } }