import org.testng.annotations.Test;
import jalview.structure.AtomSpecModel;
+import jalview.structure.StructureCommand;
import jalview.structure.StructureCommandI;
public class ChimeraXCommandsTest
.getCommand(),
"setattr #1/A:89-92|#2/B:8-9,12-20 res jv_kd '27.3' create true");
}
+
+ @Test(groups = "Functional")
+ public void testCloseViewer()
+ {
+ assertEquals(testee.closeViewer(), new StructureCommand("exit"));
+ }
+
+ @Test(groups = "Functional")
+ public void testGetSelectedResidues()
+ {
+ assertEquals(testee.getSelectedResidues(),
+ new StructureCommand("info selection level residue"));
+ }
+
+ @Test(groups = "Functional")
+ public void testStartNotifications()
+ {
+ List<StructureCommandI> cmds = testee.startNotifications("to here");
+ assertEquals(cmds.size(), 2);
+ assertEquals(cmds.get(0), new StructureCommand("info notify start models prefix ModelChanged jalview url to here"));
+ assertEquals(cmds.get(1), new StructureCommand("info notify start selection jalview prefix SelectionChanged url to here"));
+ }
+
+ @Test(groups = "Functional")
+ public void testStopNotifications()
+ {
+ List<StructureCommandI> cmds = testee.stopNotifications();
+ assertEquals(cmds.size(), 2);
+ assertEquals(cmds.get(0), new StructureCommand("info notify stop models jalview"));
+ assertEquals(cmds.get(1), new StructureCommand("info notify stop selection jalview"));
+ }
}