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-2101 unit test updated to match config file
[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
cf98e33
..
afb24c4
100644
(file)
--- a/
test/jalview/ws/jabaws/JpredJabaStructExportImport.java
+++ b/
test/jalview/ws/jabaws/JpredJabaStructExportImport.java
@@
-20,9
+20,9
@@
*/
package jalview.ws.jabaws;
*/
package jalview.ws.jabaws;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
import jalview.datamodel.AlignmentI;
import jalview.gui.Jalview2XML;
import jalview.io.AnnotationFile;
import jalview.datamodel.AlignmentI;
import jalview.gui.Jalview2XML;
import jalview.io.AnnotationFile;
@@
-42,9
+42,10
@@
import java.util.List;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
import compbio.metadata.Argument;
import compbio.metadata.WrongParameterException;
import compbio.metadata.Argument;
import compbio.metadata.WrongParameterException;
@@
-61,7
+62,7
@@
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
{
@@
-70,7
+71,6
@@
public class JpredJabaStructExportImport
for (Jws2Instance svc : disc.getServices())
{
for (Jws2Instance svc : disc.getServices())
{
-
if (svc.getServiceTypeURI().toLowerCase().contains("jpred"))
{
jpredws = svc;
if (svc.getServiceTypeURI().toLowerCase().contains("jpred"))
{
jpredws = svc;
@@
-78,18
+78,10
@@
public class JpredJabaStructExportImport
}
System.out.println("State of jpredws: " + jpredws);
}
System.out.println("State of jpredws: " + jpredws);
-
- if (jpredws == null)
- {
- System.exit(0);
- }
-
+ Assert.assertNotNull(jpredws, "jpredws is null!");
jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
-
af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE);
af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE);
-
assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
-
}
@AfterClass
}
@AfterClass
@@
-102,7
+94,7
@@
public class JpredJabaStructExportImport
}
}
}
}
- @Test
+ @Test(groups = { "Functional" })
public void testJPredStructOneSeqOnly()
{
af.selectAllSequenceMenuItem_actionPerformed(null);
public void testJPredStructOneSeqOnly()
{
af.selectAllSequenceMenuItem_actionPerformed(null);
@@
-143,7
+135,7
@@
public class JpredJabaStructExportImport
if (!success)
{
jpredClient.cancelCurrentJob();
if (!success)
{
jpredClient.cancelCurrentJob();
- fail("Jpred Client didn't run with hardwired default parameters.");
+ Assert.fail("Jpred Client didn't run with hardwired default parameters.");
}
} catch (InterruptedException x)
}
} catch (InterruptedException x)
@@
-154,7
+146,7
@@
public class JpredJabaStructExportImport
}
}
- @Test
+ @Test(groups = { "Functional" })
public void testJPredStructExport()
{
public void testJPredStructExport()
{
@@
-214,21
+206,21
@@
public class JpredJabaStructExportImport
FormatAdapter.PASTE));
// test for consistency in io
FormatAdapter.PASTE));
// test for consistency in io
- StockholmFileTest.testAlignmentEquivalence(al, al_new);
+ StockholmFileTest.testAlignmentEquivalence(al, al_new, false);
return;
} catch (Exception e)
{
e.printStackTrace();
}
return;
} catch (Exception e)
{
e.printStackTrace();
}
- fail("Test "
+ Assert.fail("Test "
+ testname
+ "\nCouldn't complete Annotation file roundtrip input/output/input test.");
}
+ testname
+ "\nCouldn't complete Annotation file roundtrip input/output/input test.");
}
- // @Test
+ @Test(groups = { "Functional" })
public void testJpredwsSettingsRecovery()
{
public void testJpredwsSettingsRecovery()
{
- fail("not implemnented");
+ Assert.fail("not implemnented");
List<compbio.metadata.Argument> opts = new ArrayList<compbio.metadata.Argument>();
for (compbio.metadata.Argument rg : (List<compbio.metadata.Argument>) jpredws
.getRunnerConfig().getArguments())
List<compbio.metadata.Argument> opts = new ArrayList<compbio.metadata.Argument>();
for (compbio.metadata.Argument rg : (List<compbio.metadata.Argument>) jpredws
.getRunnerConfig().getArguments())
@@
-240,7
+232,7
@@
public class JpredJabaStructExportImport
rg.setValue("292");
} catch (WrongParameterException q)
{
rg.setValue("292");
} catch (WrongParameterException q)
{
- fail("Couldn't set the temperature parameter "
+ Assert.fail("Couldn't set the temperature parameter "
+ q.getStackTrace());
}
opts.add(rg);
+ q.getStackTrace());
}
opts.add(rg);