JAL-3551 copy Jalview features to Pymol 'p' (with pull refactoring)
[jalview.git] / test / jalview / ext / rbvi / chimera / ChimeraCommandsTest.java
index f087020..5fc9fdc 100644 (file)
@@ -135,21 +135,24 @@ public class ChimeraCommandsTest
 
   /**
    * Tests for the method that prefixes and sanitises a feature name so it can
-   * be used as a valid, namespaced attribute name in Chimera
+   * be used as a valid, namespaced attribute name in Chimera or PyMol
    */
   @Test(groups = { "Functional" })
   public void testMakeAttributeName()
   {
-    assertEquals(ChimeraCommands.makeAttributeName(null), "jv_");
-    assertEquals(ChimeraCommands.makeAttributeName(""), "jv_");
-    assertEquals(ChimeraCommands.makeAttributeName("helix"), "jv_helix");
-    assertEquals(ChimeraCommands.makeAttributeName("Hello World 24"),
+    ChimeraCommands testee = new ChimeraCommands();
+    assertEquals(testee.makeAttributeName(null), "jv_");
+    assertEquals(testee.makeAttributeName(""), "jv_");
+    assertEquals(testee.makeAttributeName("helix"), "jv_helix");
+    assertEquals(testee.makeAttributeName(
+            "Hello World 24"),
             "jv_Hello_World_24");
     assertEquals(
-            ChimeraCommands.makeAttributeName("!this is-a_very*{odd(name"),
+            testee.makeAttributeName(
+                    "!this is-a_very*{odd(name"),
             "jv__this_is_a_very__odd_name");
     // name ending in color gets underscore appended
-    assertEquals(ChimeraCommands.makeAttributeName("helixColor"),
+    assertEquals(testee.makeAttributeName("helixColor"),
             "jv_helixColor_");
   }
 
@@ -295,7 +298,7 @@ public class ChimeraCommandsTest
   public void testGetColourCommand()
   {
     ChimeraCommands testee = new ChimeraCommands();
-    assertEquals(testee.getColourCommand("something", Color.MAGENTA)
+    assertEquals(testee.colourResidues("something", Color.MAGENTA)
             .getCommand(),
             "color #ff00ff something");
   }