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=8bfb6776cd4ccd8b8cbb9f167681ccfe265db710;hb=fa6411e3c25d907aa46aeb6a0ef2df8e49fe77d2;hp=6880985151f79529a199ebc6dd482e46ccf56aef;hpb=76528375c0b220cd59be2127d86b406b220c3e4e;p=jalview.git diff --git a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java index 6880985..8bfb677 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java @@ -49,7 +49,6 @@ public class ChimeraCommandsTest @Test(groups = { "Functional" }) public void testColourBySequence() { - Map map = new LinkedHashMap<>(); ChimeraCommands.addAtomSpecRange(map, Color.blue, "0", 2, 5, "A"); ChimeraCommands.addAtomSpecRange(map, Color.blue, "0", 7, 7, "B"); @@ -249,13 +248,6 @@ public class ChimeraCommandsTest model.addRange("5", 25, 35, " "); // empty chain code assertEquals(testee.getAtomSpec(model, true), "#0:1-4.B,3-10.C@CA&~@.B-Z&~@.2-9|#1:2-5.A,8.A,5-10.B@CA&~@.B-Z&~@.2-9|#5:25-35.@CA&~@.B-Z&~@.2-9"); - - } - - @Test(groups = "Functional") - public void testGetModelStartNo() - { - assertEquals(testee.getModelStartNo(), 0); } @Test(groups = "Functional") @@ -350,6 +342,40 @@ public class ChimeraCommandsTest } @Test(groups = "Functional") + public void testHideAll() + { + StructureCommandI cmd = testee.hideAll(); + assertEquals(cmd.getCommand(), "~display; ~ribbon"); + } + + @Test(groups = "Functional") + public void testHideChain() + { + StructureCommandI cmd = testee.hideChain("1.1", "B"); + assertEquals(cmd.getCommand(), "~ribbon #1.1:.B"); + } + + @Test(groups = "Functional") + public void testShowStructures() + { + /* + * with nothing excluded + */ + StructureCommandI cmd = testee.showStructures(null); + assertEquals(cmd.getCommand(), "ribbon"); + + /* + * restricted to specified positions + */ + AtomSpecModel restrictTo = new AtomSpecModel(); + restrictTo.addRange("1.1", 12, 20, "A"); + restrictTo.addRange("1.1", 30, 35, "A"); + restrictTo.addRange("2.1", 11, 30, "B"); + cmd = testee.showStructures(restrictTo); + assertEquals(cmd.getCommand(), + "ribbon #1.1:12-20.A,30-35.A|#2.1:11-30.B"); + } + public void testCloseViewer() { assertEquals(testee.closeViewer(), new StructureCommand("stop really"));