git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3026 JDesktop/JInternalFrames support + relative URL file loading
[jalview.git]
/
test
/
jalview
/
ext
/
ensembl
/
EnsemblGenomeTest.java
diff --git
a/test/jalview/ext/ensembl/EnsemblGenomeTest.java
b/test/jalview/ext/ensembl/EnsemblGenomeTest.java
index
991cd96
..
8687da9
100644
(file)
--- a/
test/jalview/ext/ensembl/EnsemblGenomeTest.java
+++ b/
test/jalview/ext/ensembl/EnsemblGenomeTest.java
@@
-27,6
+27,7
@@
import static org.testng.AssertJUnit.assertTrue;
import jalview.datamodel.SequenceDummy;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.datamodel.SequenceDummy;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.gui.JvOptionPane;
import jalview.io.gff.SequenceOntologyFactory;
import jalview.io.gff.SequenceOntologyLite;
import jalview.util.MapList;
import jalview.io.gff.SequenceOntologyFactory;
import jalview.io.gff.SequenceOntologyLite;
import jalview.util.MapList;
@@
-39,6
+40,14
@@
import org.testng.annotations.Test;
public class EnsemblGenomeTest
{
public class EnsemblGenomeTest
{
+
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
@BeforeClass(alwaysRun = true)
public void setUp()
{
@BeforeClass(alwaysRun = true)
public void setUp()
{
@@
-127,14
+136,16
@@
public class EnsemblGenomeTest
20500, 0f, null);
assertFalse(testee.retainFeature(sf, accId));
20500, 0f, null);
assertFalse(testee.retainFeature(sf, accId));
- sf.setType("mature_transcript");
+ sf = new SequenceFeature("mature_transcript", "", 20000, 20500, 0f,
+ null);
assertFalse(testee.retainFeature(sf, accId));
assertFalse(testee.retainFeature(sf, accId));
- sf.setType("NMD_transcript_variant");
+ sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500,
+ 0f, null);
assertFalse(testee.retainFeature(sf, accId));
// other feature with no parent is kept
assertFalse(testee.retainFeature(sf, accId));
// other feature with no parent is kept
- sf.setType("anything");
+ sf = new SequenceFeature("anything", "", 20000, 20500, 0f, null);
assertTrue(testee.retainFeature(sf, accId));
// other feature with correct parent is kept
assertTrue(testee.retainFeature(sf, accId));
// other feature with correct parent is kept
@@
-170,19
+181,23
@@
public class EnsemblGenomeTest
assertTrue(testee.identifiesSequence(sf, accId));
// transcript sub-type with right ID is valid
assertTrue(testee.identifiesSequence(sf, accId));
// transcript sub-type with right ID is valid
- sf.setType("ncRNA");
+ sf = new SequenceFeature("ncRNA", "", 1, 2, 0f, null);
+ sf.setValue("ID", "transcript:" + accId);
assertTrue(testee.identifiesSequence(sf, accId));
// Ensembl treats NMD_transcript_variant as if a transcript
assertTrue(testee.identifiesSequence(sf, accId));
// Ensembl treats NMD_transcript_variant as if a transcript
- sf.setType("NMD_transcript_variant");
+ sf = new SequenceFeature("NMD_transcript_variant", "", 1, 2, 0f, null);
+ sf.setValue("ID", "transcript:" + accId);
assertTrue(testee.identifiesSequence(sf, accId));
// gene not valid:
assertTrue(testee.identifiesSequence(sf, accId));
// gene not valid:
- sf.setType("gene");
+ sf = new SequenceFeature("gene", "", 1, 2, 0f, null);
+ sf.setValue("ID", "transcript:" + accId);
assertFalse(testee.identifiesSequence(sf, accId));
// exon not valid:
assertFalse(testee.identifiesSequence(sf, accId));
// exon not valid:
- sf.setType("exon");
+ sf = new SequenceFeature("exon", "", 1, 2, 0f, null);
+ sf.setValue("ID", "transcript:" + accId);
assertFalse(testee.identifiesSequence(sf, accId));
}
assertFalse(testee.identifiesSequence(sf, accId));
}