JAL-2157 fixed Jalview2xmlTest
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 29 Jul 2016 09:38:38 +0000 (10:38 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 29 Jul 2016 09:38:38 +0000 (10:38 +0100)
test/jalview/io/Jalview2xmlTests.java

index 38153df..d941242 100644 (file)
@@ -41,6 +41,8 @@ import jalview.gui.Desktop;
 import jalview.gui.Jalview2XML;
 import jalview.schemes.AnnotationColourGradient;
 import jalview.schemes.ColourSchemeI;
+import jalview.structure.StructureImportSettings;
+import jalview.structure.StructureImportSettings.StructureParser;
 import jalview.viewmodel.AlignmentViewport;
 
 import java.io.File;
@@ -274,6 +276,9 @@ public class Jalview2xmlTests
             Boolean.TRUE.toString());
     Cache.applicationProperties.setProperty("ADD_SS_ANN",
             Boolean.TRUE.toString());
+     StructureImportSettings.setDefaultStructureFileFormat("PDB");
+    StructureImportSettings
+            .setDefaultPDBFileParser(StructureParser.JALVIEW_PARSER);
     AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
             "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
     assertTrue("Didn't read in the example file correctly.", af != null);
@@ -373,6 +378,9 @@ public class Jalview2xmlTests
   @Test(groups = { "Functional" }, enabled = true)
   public void testStoreAndRecoverExpandedviews() throws Exception
   {
+    StructureImportSettings
+            .setDefaultPDBFileParser(StructureParser.JALVIEW_PARSER);
+    StructureImportSettings.setDefaultStructureFileFormat("PDB");
     AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
             "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
     assertTrue("Didn't read in the example file correctly.", af != null);
@@ -435,6 +443,7 @@ public class Jalview2xmlTests
   public void testStoreAndRecoverReferenceSeqSettings() throws Exception
   {
     Desktop.instance.closeAll_actionPerformed(null);
+    StructureImportSettings.setDefaultStructureFileFormat("PDB");
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
     assertTrue("Didn't read in the example file correctly.", af != null);