- model.addRange(1, 89, 92, "A");
- model.addRange(2, 12, 20, "B");
- model.addRange(2, 8, 9, "B");
- assertEquals(testee.setAttribute("phi", "27.3", model),
- "setattr res phi '27.3' #1:89-92.A|#2:8-9.B,12-20.B");
+ model.addRange("1", 89, 92, "A");
+ model.addRange("2", 12, 20, "B");
+ model.addRange("2", 8, 9, "B");
+ 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 testListResidueAttributes()
+ {
+ assertEquals(testee.listResidueAttributes(),
+ new StructureCommand("list resattr"));
+ }
+
+ @Test(groups = "Functional")
+ public void testGetResidueAttributes()
+ {
+ assertEquals(testee.getResidueAttributes("binding site"),
+ new StructureCommand("list residues attr 'binding site'"));
+ }
+
+ @Test(groups = "Functional")
+ public void testStartNotifications()
+ {
+ List<StructureCommandI> 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<StructureCommandI> 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"));