{
Desktop.closeDesktop();
}
-
- public static void callJalviewMain(String[] args) {
- if (Jalview.getInstance()!=null) {
+
+ public static void callJalviewMain(String[] args)
+ {
+ if (Jalview.getInstance() != null)
+ {
Jalview.getInstance().doMain(args);
- } else {
+ }
+ else
+ {
Jalview.main(args);
}
}
}
}
- @Test(groups = "Functional", dataProvider = "structureImageOutputFiles")
+ @Test(
+ groups =
+ { "Functional", "testTask1" },
+ dataProvider = "structureImageOutputFiles")
public void structureImageOutputTest(String cmdLine, String[] filenames)
throws IOException
{
{
cleanupFiles(filenames);
String[] args = (cmdLine + " --gui").split("\\s+");
- try {
- callJalviewMain(args);
- Commands cmds = Jalview.getInstance().getCommands();
- Assert.assertNotNull(cmds);
- File lastFile = null;
- for (String filename : filenames)
+ try
{
- File file = new File(filename);
- Assert.assertTrue(file.exists(), "File '" + filename
- + "' was not created by '" + cmdLine + "'");
- Assert.assertTrue(file.isFile(), "File '" + filename
- + "' is not a file from '" + cmdLine + "'");
- Assert.assertTrue(Files.size(file.toPath()) > 0, "File '" + filename
- + "' has no content from '" + cmdLine + "'");
- // make sure the successive output files get bigger!
- if (lastFile != null)
- Assert.assertTrue(
- Files.size(file.toPath()) > Files.size(lastFile.toPath()));
- }
+ callJalviewMain(args);
+ Commands cmds = Jalview.getInstance().getCommands();
+ Assert.assertNotNull(cmds);
+ File lastFile = null;
+ for (String filename : filenames)
+ {
+ File file = new File(filename);
+ Assert.assertTrue(file.exists(), "File '" + filename
+ + "' was not created by '" + cmdLine + "'");
+ Assert.assertTrue(file.isFile(), "File '" + filename
+ + "' is not a file from '" + cmdLine + "'");
+ Assert.assertTrue(Files.size(file.toPath()) > 0, "File '" + filename
+ + "' has no content from '" + cmdLine + "'");
+ // make sure the successive output files get bigger!
+ if (lastFile != null)
+ Assert.assertTrue(Files.size(file.toPath()) > Files
+ .size(lastFile.toPath()));
+ }
} catch (Exception x)
{
- Assert.fail("Unexpected exception during argFilesGlobAndSubstitutions",
+ Assert.fail(
+ "Unexpected exception during argFilesGlobAndSubstitutions",
x);
} finally
{
{ testfiles + "/structureimage1.png",
testfiles + "/structureimage2.png",
testfiles + "/structureimage3.png" } },
- /*
{ "--headless --noquit --open=./examples/test_fab41.result/sample.a2m "
+ "--structure=./examples/test_fab41.result/test_fab41_unrelaxed_rank_1_model_3.pdb "
+ "--structureimage=" + testfiles + "/structureimage1.png "
{ testfiles + "/structureimage1.png",
testfiles + "/structureimage2.png",
testfiles + "/structureimage3.png" } },
+ /*
*/
//
};