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=15d744b8473d41c24d616a21042cb7e8da84ab5f;hb=4994aa94fd62af0058f2db96f0ea6c4ca1abe80b;hp=b0406873429984de41027d3e5a518720eaf74e5a;hpb=2fb924ec0d110eb3ca6c3fb06efa27acd34b2750;p=jalview.git diff --git a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java index b040687..15d744b 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java @@ -33,6 +33,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import jalview.structure.AtomSpecModel; +import jalview.structure.StructureCommand; import jalview.structure.StructureCommandI; public class ChimeraCommandsTest @@ -347,4 +348,35 @@ public class ChimeraCommandsTest assertEquals(testee.setAttribute("jv_kd", "27.3", model).getCommand(), "setattr res jv_kd '27.3' #1:89-92.A|#2:8-9.B,12-20.B"); } + + @Test(groups = "Functional") + public void testCloseViewer() + { + assertEquals(testee.closeViewer(), new StructureCommand("stop really")); + } + + @Test(groups = "Functional") + public void testGetSelectedResidues() + { + assertEquals(testee.getSelectedResidues(), + new StructureCommand("list selection level residue")); + } + + @Test(groups = "Functional") + public void testStartNotifications() + { + List cmds = testee.startNotifications("to here"); + assertEquals(cmds.size(), 2); + assertEquals(cmds.get(0), new StructureCommand("listen start models url to here")); + assertEquals(cmds.get(1), new StructureCommand("listen start select prefix SelectionChanged url to here")); + } + + @Test(groups = "Functional") + public void testStopNotifications() + { + List cmds = testee.stopNotifications(); + assertEquals(cmds.size(), 2); + assertEquals(cmds.get(0), new StructureCommand("listen stop models")); + assertEquals(cmds.get(1), new StructureCommand("listen stop selection")); + } }