X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Frbvi%2Fchimera%2FChimeraCommandsTest.java;fp=test%2Fjalview%2Fext%2Frbvi%2Fchimera%2FChimeraCommandsTest.java;h=0679098db068e0068da17683a417fa40b49f2ae1;hb=6cb920bb7a7f285a165cd34b3429dabba71f7518;hp=6a02576840a31de0950bdc2f2f2084268fbb54ad;hpb=675952adfc6e4c165f3e3fdb8384d6688637e972;p=jalview.git diff --git a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java index 6a02576..0679098 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java @@ -83,8 +83,9 @@ public class ChimeraCommandsTest featuresMap.put("chain", featureValues); ChimeraCommands.addAtomSpecRange(featureValues, "X", 0, 8, 20, "A"); - List commands = ChimeraCommands - .buildSetAttributeCommands(featuresMap, false); + ChimeraCommands commandGenerator = new ChimeraCommands(); + List commands = commandGenerator + .buildSetAttributeCommands(featuresMap); assertEquals(1, commands.size()); /* @@ -97,8 +98,7 @@ public class ChimeraCommandsTest ChimeraCommands.addAtomSpecRange(featureValues, "X", 0, 3, 9, "A"); // same feature value, contiguous range ChimeraCommands.addAtomSpecRange(featureValues, "X", 0, 21, 25, "A"); - commands = ChimeraCommands.buildSetAttributeCommands(featuresMap, - false); + commands = commandGenerator.buildSetAttributeCommands(featuresMap); assertEquals(1, commands.size()); assertEquals(commands.get(0), "setattr res jv_chain 'X' #0:3-25.A"); @@ -106,16 +106,14 @@ public class ChimeraCommandsTest ChimeraCommands.addAtomSpecRange(featureValues, "X", 0, 21, 25, "B"); // same feature value and chain, different model ChimeraCommands.addAtomSpecRange(featureValues, "X", 1, 26, 30, "A"); - commands = ChimeraCommands.buildSetAttributeCommands(featuresMap, - false); + commands = commandGenerator.buildSetAttributeCommands(featuresMap); assertEquals(1, commands.size()); assertEquals(commands.get(0), "setattr res jv_chain 'X' #0:3-25.A,21-25.B|#1:26-30.A"); // same feature, different value ChimeraCommands.addAtomSpecRange(featureValues, "Y", 0, 40, 50, "A"); - commands = ChimeraCommands.buildSetAttributeCommands(featuresMap, - false); + commands = commandGenerator.buildSetAttributeCommands(featuresMap); assertEquals(2, commands.size()); // commands are ordered by feature type but not by value // so use contains to test for the expected command: @@ -132,8 +130,7 @@ public class ChimeraCommandsTest "A"); // feature names are sanitised to change non-alphanumeric to underscore // feature values are sanitised to encode single quote characters - commands = ChimeraCommands.buildSetAttributeCommands(featuresMap, - false); + commands = commandGenerator.buildSetAttributeCommands(featuresMap); assertTrue(commands .contains( "setattr res jv_side_chain_binding_ 'metal 'ion!' #0:7-15.A")); @@ -160,7 +157,7 @@ public class ChimeraCommandsTest } @Test(groups = { "Functional" }) - public void testGetColourBySequenceCommands_hiddenColumns() + public void testColourBySequence_hiddenColumns() { /* * load these sequences, coloured by Strand propensity,