X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FJalviewExportPropertiesTests.java;h=59c5986b603a26188683fbebacc6752b803a0449;hb=20d8cc2bb3e2fab2b7f637a3d523c90ceb58903d;hp=06d177dca2bb622cd659499746aeef8d5063b325;hpb=483e7163b1fb8d4bcb9393014816c944befce328;p=jalview.git diff --git a/test/jalview/io/JalviewExportPropertiesTests.java b/test/jalview/io/JalviewExportPropertiesTests.java index 06d177d..59c5986 100644 --- a/test/jalview/io/JalviewExportPropertiesTests.java +++ b/test/jalview/io/JalviewExportPropertiesTests.java @@ -22,14 +22,15 @@ package jalview.io; import static org.testng.AssertJUnit.assertTrue; -import jalview.datamodel.SequenceGroup; -import jalview.gui.AlignFrame; -import jalview.gui.JvOptionPane; - import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import jalview.datamodel.SequenceGroup; +import jalview.gui.AlignFrame; +import jalview.gui.Desktop; +import jalview.gui.JvOptionPane; + /** * tests which verify that properties and preferences are correctly interpreted * when exporting/importing data @@ -53,8 +54,9 @@ public class JalviewExportPropertiesTests @BeforeClass(alwaysRun = true) public static void setUpBeforeClass() throws Exception { - jalview.bin.Jalview.main(new String[] { "-props", - "test/jalview/io/testProps.jvprops" }); + jalview.bin.Jalview + .main(new String[] + { "-props", "test/jalview/io/testProps.jvprops" }); } /** @@ -63,7 +65,8 @@ public class JalviewExportPropertiesTests @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { - jalview.gui.Desktop.instance.closeAll_actionPerformed(null); + if (Desktop.instance != null) + Desktop.instance.closeAll_actionPerformed(null); } @@ -85,8 +88,8 @@ public class JalviewExportPropertiesTests sg.setStartRes(1); sg.setEndRes(7); af.getViewport().setSelectionGroup(sg); - String fseqs = new FormatAdapter(af.alignPanel).formatSequences( - FileFormat.Fasta, af.alignPanel, true); + String fseqs = new FormatAdapter(af.alignPanel) + .formatSequences(FileFormat.Fasta, af.alignPanel, true); assertTrue("Couldn't find '.' in the exported region\n" + fseqs, fseqs.indexOf(".") > -1); }