}
@Test(groups = "Functional")
- public void testGetModelStartNo()
- {
- assertEquals(testee.getModelStartNo(), 0);
- }
-
- @Test(groups = "Functional")
public void testGetResidueSpec()
{
assertEquals(testee.getResidueSpec("ALA"), "resn ALA");
}
@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"));