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 'features/mchmmer' into merge/wsinterfaces_mchmmer_JAL-3070_JAL-1950
[jalview.git]
/
test
/
jalview
/
ws
/
jws2
/
ParameterUtilsTest.java
diff --git
a/test/jalview/ws/jws2/ParameterUtilsTest.java
b/test/jalview/ws/jws2/ParameterUtilsTest.java
index
1e02213
..
66ce169
100644
(file)
--- a/
test/jalview/ws/jws2/ParameterUtilsTest.java
+++ b/
test/jalview/ws/jws2/ParameterUtilsTest.java
@@
-25,6
+25,8
@@
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
import jalview.bin.Cache;
import static org.testng.AssertJUnit.assertTrue;
import jalview.bin.Cache;
+import jalview.gui.JvOptionPane;
+import jalview.ws.api.UIinfo;
import jalview.ws.jabaws.JalviewJabawsTestUtils;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.jabaws.JalviewJabawsTestUtils;
import jalview.ws.jws2.jabaws2.Jws2Instance;
@@
-41,13
+43,26
@@
import compbio.metadata.Preset;
import compbio.metadata.PresetManager;
import compbio.metadata.WrongParameterException;
import compbio.metadata.PresetManager;
import compbio.metadata.WrongParameterException;
+/*
+ * All methods in this class are set to the Network group because setUpBeforeClass will fail
+ * if there is no network.
+ */
+@Test(singleThreaded = true)
public class ParameterUtilsTest
{
public class ParameterUtilsTest
{
+
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
/*
* To limit tests to specify services, add them to this list; leave list empty
* to test all
*/
/*
* To limit tests to specify services, add them to this list; leave list empty
* to test all
*/
- private static List<String> serviceTests = new ArrayList<String>();
+ private static List<String> serviceTests = new ArrayList<>();
private static Jws2Discoverer disc = null;
private static Jws2Discoverer disc = null;
@@
-60,7
+75,7
@@
public class ParameterUtilsTest
disc = JalviewJabawsTestUtils.getJabawsDiscoverer();
}
disc = JalviewJabawsTestUtils.getJabawsDiscoverer();
}
- @Test(groups = { "Functional" })
+ @Test(groups = { "Network" })
public void testWriteParameterSet() throws WrongParameterException
{
for (Jws2Instance service : disc.getServices())
public void testWriteParameterSet() throws WrongParameterException
{
for (Jws2Instance service : disc.getServices())
@@
-114,13
+129,13
@@
public class ParameterUtilsTest
* @param service
* @return
*/
* @param service
* @return
*/
- public boolean isForTesting(Jws2Instance service)
+ public boolean isForTesting(UIinfo service)
{
return serviceTests.size() == 0
{
return serviceTests.size() == 0
- || serviceTests.contains(service.serviceType.toLowerCase());
+ || serviceTests.contains(service.getName().toLowerCase());
}
}
- @Test(groups = { "Functional" })
+ @Test(groups = { "Network" })
public void testCopyOption()
{
for (Jws2Instance service : disc.getServices())
public void testCopyOption()
{
for (Jws2Instance service : disc.getServices())
@@
-144,7
+159,7
@@
public class ParameterUtilsTest
/**
*/
/**
*/
- @Test(groups = { "Functional" })
+ @Test(groups = { "Network" })
public void testCopyParameter()
{
for (Jws2Instance service : disc.getServices())
public void testCopyParameter()
{
for (Jws2Instance service : disc.getServices())