import static org.testng.AssertJUnit.assertTrue;
import jalview.gui.AlignFrame;
+import jalview.gui.JvOptionPane;
+import jalview.ws.rest.clientdefs.ShmrRestClient;
import java.util.Map;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/**
public class ShmmrRSBSService
{
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
@Test(groups = { "Functional" })
public void testShmmrService()
{
assertTrue(
"Test Rsd Exchange using using default Shmmr service failed.",
testRsdExchange("Test using default Shmmr service",
- RestClient.makeShmmrRestClient().service));
+ ShmrRestClient.makeShmmrRestClient().service));
}
@Test(groups = { "Functional" })
public void testShmmrServiceDataprep() throws Exception
{
- RestClient _rc = RestClient.makeShmmrRestClient();
+ RestClient _rc = ShmrRestClient.makeShmmrRestClient();
assertNotNull(_rc);
AlignFrame alf = new jalview.io.FileLoader(false)
.LoadFileWaitTillLoaded("examples/testdata/smad.fa",
- jalview.io.FormatAdapter.FILE);
+ jalview.io.DataSourceType.FILE);
assertNotNull("Couldn't find test data.", alf);
alf.loadJalviewDataFile("examples/testdata/smad_groups.jva",
- jalview.io.FormatAdapter.FILE, null, null);
+ jalview.io.DataSourceType.FILE, null, null);
assertTrue(
"Couldn't load the test data's annotation file (should be 5 groups but found "
+ alf.getViewport().getAlignment().getGroups().size()
if (!service.equals(newService))
{
System.err.println("Failed for service (" + desc + ").");
+ if (fromservicetostring.equals(newService.toString()))
+ {
+ System.err.println(
+ "Description strings are equivalent: fault during RestServiceDescription.equals()");
+ return false;
+ }
System.err.println("Original service and parsed service differ.");
System.err.println("Original: " + fromservicetostring);
System.err.println("Parsed : " + newService.toString());