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
Merge branch 'develop' into trialMerge
[jalview.git]
/
test
/
jalview
/
ws
/
jabaws
/
JpredJabaStructExportImport.java
diff --git
a/test/jalview/ws/jabaws/JpredJabaStructExportImport.java
b/test/jalview/ws/jabaws/JpredJabaStructExportImport.java
index
e347e55
..
b8fe0a3
100644
(file)
--- a/
test/jalview/ws/jabaws/JpredJabaStructExportImport.java
+++ b/
test/jalview/ws/jabaws/JpredJabaStructExportImport.java
@@
-23,9
+23,13
@@
package jalview.ws.jabaws;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
+import jalview.bin.Cache;
import jalview.datamodel.AlignmentI;
import jalview.gui.Jalview2XML;
import jalview.datamodel.AlignmentI;
import jalview.gui.Jalview2XML;
+import jalview.gui.JvOptionPane;
import jalview.io.AnnotationFile;
import jalview.io.AnnotationFile;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
import jalview.io.FormatAdapter;
import jalview.io.StockholmFileTest;
import jalview.ws.jws2.JPred301Client;
import jalview.io.FormatAdapter;
import jalview.io.StockholmFileTest;
import jalview.ws.jws2.JPred301Client;
@@
-52,6
+56,14
@@
import compbio.metadata.WrongParameterException;
public class JpredJabaStructExportImport
{
public class JpredJabaStructExportImport
{
+
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
public static String testseqs = "examples/uniref50.fa";
public static Jws2Discoverer disc;
public static String testseqs = "examples/uniref50.fa";
public static Jws2Discoverer disc;
@@
-62,11
+74,11
@@
public class JpredJabaStructExportImport
public static jalview.gui.AlignFrame af = null;
public static jalview.gui.AlignFrame af = null;
- @BeforeClass
+ @BeforeClass(alwaysRun = true)
public static void setUpBeforeClass() throws Exception
{
public static void setUpBeforeClass() throws Exception
{
-
- jalview.bin.Cache.initLogger();
+ Cache.loadProperties("test/jalview/io/testProps.jvprops");
+ Cache.initLogger();
disc = JalviewJabawsTestUtils.getJabawsDiscoverer(false);
for (Jws2Instance svc : disc.getServices())
disc = JalviewJabawsTestUtils.getJabawsDiscoverer(false);
for (Jws2Instance svc : disc.getServices())
@@
-80,11
+92,11
@@
public class JpredJabaStructExportImport
System.out.println("State of jpredws: " + jpredws);
Assert.assertNotNull(jpredws, "jpredws is null!");
jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
System.out.println("State of jpredws: " + jpredws);
Assert.assertNotNull(jpredws, "jpredws is null!");
jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
- af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE);
+ af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.DataSourceType.FILE);
assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
}
assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
}
- @AfterClass
+ @AfterClass(alwaysRun = true)
public static void tearDownAfterClass() throws Exception
{
if (af != null)
public static void tearDownAfterClass() throws Exception
{
if (af != null)
@@
-94,7
+106,7
@@
public class JpredJabaStructExportImport
}
}
}
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testJPredStructOneSeqOnly()
{
af.selectAllSequenceMenuItem_actionPerformed(null);
public void testJPredStructOneSeqOnly()
{
af.selectAllSequenceMenuItem_actionPerformed(null);
@@
-146,7
+158,7
@@
public class JpredJabaStructExportImport
}
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testJPredStructExport()
{
public void testJPredStructExport()
{
@@
-176,8
+188,8
@@
public class JpredJabaStructExportImport
try
{
// what format would be appropriate for RNAalifold annotations?
try
{
// what format would be appropriate for RNAalifold annotations?
- String aligfileout = new FormatAdapter().formatSequences("PFAM",
- al.getSequencesArray());
+ String aligfileout = FileFormat.Pfam.getAlignmentFile().print(
+ al.getSequencesArray(), true);
String anfileout = new AnnotationFile()
.printAnnotationsForAlignment(al);
String anfileout = new AnnotationFile()
.printAnnotationsForAlignment(al);
@@
-197,13
+209,13
@@
public class JpredJabaStructExportImport
// again what format would be appropriate?
AlignmentI al_new = new FormatAdapter().readFile(aligfileout,
// again what format would be appropriate?
AlignmentI al_new = new FormatAdapter().readFile(aligfileout,
- FormatAdapter.PASTE, "PFAM");
+ DataSourceType.PASTE, FileFormat.Fasta);
assertTrue(
"Test "
+ testname
+ "\nregenerated annotation file did not annotate alignment.",
new AnnotationFile().readAnnotationFile(al_new, anfileout,
assertTrue(
"Test "
+ testname
+ "\nregenerated annotation file did not annotate alignment.",
new AnnotationFile().readAnnotationFile(al_new, anfileout,
- FormatAdapter.PASTE));
+ DataSourceType.PASTE));
// test for consistency in io
StockholmFileTest.testAlignmentEquivalence(al, al_new, false);
// test for consistency in io
StockholmFileTest.testAlignmentEquivalence(al, al_new, false);
@@
-217,7
+229,7
@@
public class JpredJabaStructExportImport
+ "\nCouldn't complete Annotation file roundtrip input/output/input test.");
}
+ "\nCouldn't complete Annotation file roundtrip input/output/input test.");
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testJpredwsSettingsRecovery()
{
Assert.fail("not implemnented");
public void testJpredwsSettingsRecovery()
{
Assert.fail("not implemnented");