JAL-3390 new View menu option to hide hidden regions in structure
[jalview.git] / test / jalview / ext / rbvi / chimera / ChimeraCommandsTest.java
index 49a951e..fbfe33c 100644 (file)
@@ -59,7 +59,7 @@ public class ChimeraCommandsTest
   public void testBuildColourCommands()
   {
 
-    Map<Object, AtomSpecModel> map = new LinkedHashMap<Object, AtomSpecModel>();
+    Map<Object, AtomSpecModel> map = new LinkedHashMap<>();
     ChimeraCommands.addColourRange(map, Color.blue, 0, 2, 5, "A");
     ChimeraCommands.addColourRange(map, Color.blue, 0, 7, 7, "B");
     ChimeraCommands.addColourRange(map, Color.blue, 0, 9, 23, "A");
@@ -72,10 +72,11 @@ public class ChimeraCommandsTest
 
     // Colours should appear in the Chimera command in the order in which
     // they were added; within colour, by model, by chain, ranges in start order
+    // all prefixed with #808080 to colour hidden regions (if shown) gray
     String command = ChimeraCommands.buildColourCommands(map).get(0);
     assertEquals(
             command,
-            "color #0000ff #0:2-5.A,9-23.A,7.B|#1:1.A,4-7.B; color #ffff00 #1:3-5.A,8.A; color #ff0000 #0:3-9.A");
+            "color #808080; color #0000ff #0:2-5.A,9-23.A,7.B|#1:1.A,4-7.B; color #ffff00 #1:3-5.A,8.A; color #ff0000 #0:3-9.A");
   }
 
   @Test(groups = { "Functional" })
@@ -84,8 +85,8 @@ public class ChimeraCommandsTest
     /*
      * make a map of { featureType, {featureValue, {residue range specification } } }
      */
-    Map<String, Map<Object, AtomSpecModel>> featuresMap = new LinkedHashMap<String, Map<Object, AtomSpecModel>>();
-    Map<Object, AtomSpecModel> featureValues = new HashMap<Object, AtomSpecModel>();
+    Map<String, Map<Object, AtomSpecModel>> featuresMap = new LinkedHashMap<>();
+    Map<Object, AtomSpecModel> featureValues = new HashMap<>();
     
     /*
      * start with just one feature/value...
@@ -189,7 +190,7 @@ public class ChimeraCommandsTest
     /*
      * map residues 1-10 to residues 21-30 (atoms 105-150) in structures
      */
-    HashMap<Integer, int[]> map = new HashMap<Integer, int[]>();
+    HashMap<Integer, int[]> map = new HashMap<>();
     for (int pos = 1; pos <= seq1.getLength(); pos++)
     {
       map.put(pos, new int[] { 20 + pos, 5 * (20 + pos) });
@@ -202,7 +203,8 @@ public class ChimeraCommandsTest
     ssm.addStructureMapping(sm2);
 
     StructureMappingcommandSet[] commands = ChimeraCommands
-            .getColourBySequenceCommand(ssm, files, seqs, sr, af.alignPanel);
+            .getColourBySequenceCommand(ssm, files, seqs, sr, false,
+                    af.alignPanel);
     assertEquals(1, commands.length);
     assertEquals(1, commands[0].commands.length);
     String theCommand = commands[0].commands[0];
@@ -210,7 +212,7 @@ public class ChimeraCommandsTest
     assertTrue(theCommand.contains("color #82827d #0:21.A|#1:21.B"));
     // H colour is #60609f
     assertTrue(theCommand.contains("color #60609f #0:22.A"));
-    // V colour is ##ffff00
+    // V colour is #ffff00
     assertTrue(theCommand.contains("color #ffff00 #1:22.B"));
     // hidden columns are Gray (128, 128, 128)
     assertTrue(theCommand.contains("color #808080 #0:23-25.A|#1:23-25.B"));