X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Fpymol%2FPymolCommandsTest.java;h=f6ef68e258ec8a6bc42b9d43b3210c83ea4d747c;hb=fa6411e3c25d907aa46aeb6a0ef2df8e49fe77d2;hp=f6bad9265b7397d12bd430ccdc96aeb5483304d6;hpb=76528375c0b220cd59be2127d86b406b220c3e4e;p=jalview.git diff --git a/test/jalview/ext/pymol/PymolCommandsTest.java b/test/jalview/ext/pymol/PymolCommandsTest.java index f6bad92..f6ef68e 100644 --- a/test/jalview/ext/pymol/PymolCommandsTest.java +++ b/test/jalview/ext/pymol/PymolCommandsTest.java @@ -173,12 +173,6 @@ public class PymolCommandsTest } @Test(groups = "Functional") - public void testGetModelStartNo() - { - assertEquals(testee.getModelStartNo(), 0); - } - - @Test(groups = "Functional") public void testGetResidueSpec() { assertEquals(testee.getResidueSpec("ALA"), "resn ALA"); @@ -343,6 +337,40 @@ public class PymolCommandsTest } @Test(groups = "Functional") + public void testHideAll() + { + StructureCommandI cmd = testee.hideAll(); + assertEquals(cmd, new StructureCommand("hide", "everything")); + } + + @Test(groups = "Functional") + public void testHideChain() + { + StructureCommandI cmd = testee.hideChain("1.1", "B"); + assertEquals(cmd, new StructureCommand("hide", "1.1//B//")); + } + + @Test(groups = "Functional") + public void testShowStructures() + { + /* + * with nothing excluded + */ + StructureCommandI cmd = testee.showStructures(null); + assertEquals(cmd, new StructureCommand("show", "cartoon")); + + /* + * 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, new StructureCommand("show", "cartoon", + "1.1//A/12-20+30-35/ 2.1//B/11-30/")); + } + public void testCloseViewer() { assertEquals(testee.closeViewer(), new StructureCommand("quit"));