JAL-1270 more fix for failing Functional test
[jalview.git] / test / jalview / structure / Mapping.java
index aae1f3d..8674ed8 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * 
+ * This file is part of Jalview.
+ * 
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License 
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *  
+ * Jalview is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty 
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * PURPOSE.  See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
 package jalview.structure;
 
 import static org.testng.AssertJUnit.assertEquals;
@@ -10,13 +30,12 @@ import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.io.FileLoader;
 import jalview.io.FormatAdapter;
+import jalview.io.StructureFile;
 
 import org.testng.Assert;
 import org.testng.AssertJUnit;
 import org.testng.annotations.Test;
 
-import MCview.PDBfile;
-
 public class Mapping
 {
 
@@ -47,7 +66,7 @@ public class Mapping
       { 303, 315 }, sheets[] = new int[] { 267, 268, 269, 270 };
 
       StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager();
-      PDBfile pmap = ssm.setMapping(true, new SequenceI[] { uprot },
+      StructureFile pmap = ssm.setMapping(true, new SequenceI[] { uprot },
               new String[] { "A" }, "test/jalview/ext/jmol/1QCF.pdb",
               jalview.io.FormatAdapter.FILE);
       assertTrue(pmap != null);
@@ -118,7 +137,8 @@ public class Mapping
     StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager();
     // Associate the 1GAQ pdb file with the subsequence 'imported' from another
     // source
-    PDBfile pde = ssm.setMapping(true, new SequenceI[] { sq }, new String[]
+    StructureFile pde = ssm.setMapping(true, new SequenceI[] { sq },
+            new String[]
     { "A" }, inFile = "examples/1gaq.txt", jalview.io.FormatAdapter.FILE);
     assertTrue("PDB File couldn't be found", pde != null);
     StructureMapping[] mp = ssm.getMapping(inFile);
@@ -214,7 +234,7 @@ public class Mapping
                     FormatAdapter.PASTE, "FASTA");
     SequenceI newseq = seqf.getViewport().getAlignment().getSequenceAt(0);
     StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager();
-    PDBfile pmap = ssm.setMapping(true, new SequenceI[] { newseq },
+    StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq },
             new String[] { null }, "examples/3W5V.pdb",
             jalview.io.FormatAdapter.FILE);
     if (pmap == null)
@@ -230,6 +250,7 @@ public class Mapping
   @Test(groups = { "Functional" })
   public void compareTransferredToRefPDBAnnot() throws Exception
   {
+    StructureViewSettings.setShowSeqFeatures(true);
     AlignFrame ref = new FileLoader(false)
             .LoadFileWaitTillLoaded("test/jalview/ext/jmol/1QCF.pdb",
                     jalview.io.FormatAdapter.FILE);
@@ -242,7 +263,7 @@ public class Mapping
     StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager();
     ssm.setProcessSecondaryStructure(true);
     ssm.setAddTempFacAnnot(true);
-    PDBfile pmap = ssm.setMapping(true, new SequenceI[] { newseq },
+    StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq },
             new String[] { null }, "test/jalview/ext/jmol/1QCF.pdb",
             jalview.io.FormatAdapter.FILE);
     assertTrue(pmap != null);