X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Frbvi%2Fchimera%2FChimeraCommandsTest.java;h=fbfe33c171c4a34cd0906c774593447d28b606c8;hb=e34c8452beda2cf80c2a3224f236d3096db69ae9;hp=49a951e04cc470061ce61406ac6ac12e4e969768;hpb=2888e7307e1f7c8239234941498cb86e8c65ab36;p=jalview.git diff --git a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java index 49a951e..fbfe33c 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java @@ -59,7 +59,7 @@ public class ChimeraCommandsTest public void testBuildColourCommands() { - Map map = new LinkedHashMap(); + Map 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> featuresMap = new LinkedHashMap>(); - Map featureValues = new HashMap(); + Map> featuresMap = new LinkedHashMap<>(); + Map 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 map = new HashMap(); + HashMap 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"));