/**
* 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_");
}
public void testGetColourCommand()
{
ChimeraCommands testee = new ChimeraCommands();
- assertEquals(testee.getColourCommand("something", Color.MAGENTA)
+ assertEquals(testee.colourResidues("something", Color.MAGENTA)
.getCommand(),
"color #ff00ff something");
}