/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import static org.testng.AssertJUnit.assertTrue;
import jalview.gui.AlignFrame;
+import jalview.gui.JvOptionPane;
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()
{
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()
- + ").", alf.getViewport().getAlignment().getGroups()
- .size() == 5);
+ + ").",
+ alf.getViewport().getAlignment().getGroups().size() == 5);
RestClient rc = new RestClient(_rc.service, alf, true);
assertNotNull("Couldn't creat RestClient job.", rc);
- jalview.bin.Cache.initLogger();
+ jalview.bin.Console.initLogger();
RestJob rjb = new RestJob(0, new RestJobThread(rc),
rc.av.getAlignment(), null);
rjb.setAlignmentForInputs(rc.service.getInputParams().values(),
return testRsdExchange(desc, newService);
} catch (Throwable x)
{
- System.err.println("Failed for service (" + desc + "): "
- + servicestring);
+ System.err.println(
+ "Failed for service (" + desc + "): " + servicestring);
x.printStackTrace();
return false;
}
fromservicetostring);
if (!newService.isValid())
{
- throw new Error("Failed to create service from '"
- + fromservicetostring + "'.\n"
- + newService.getInvalidMessage());
+ throw new Error(
+ "Failed to create service from '" + fromservicetostring
+ + "'.\n" + newService.getInvalidMessage());
}
if (!service.equals(newService))
}
} catch (Throwable x)
{
- System.err.println("Failed for service (" + desc + "): "
- + service.toString());
+ System.err.println(
+ "Failed for service (" + desc + "): " + service.toString());
x.printStackTrace();
return false;
}