JAL-3551 working proof of concept of Jalview driving PyMOL
[jalview.git] / test / jalview / ext / pymol / PymolManagerTest.java
1 package jalview.ext.pymol;
2
3 import static org.testng.Assert.assertEquals;
4
5 import jalview.structure.StructureCommand;
6
7 import org.testng.annotations.Test;
8
9 public class PymolManagerTest
10 {
11   @Test(groups = "Functional")
12   public void testGetPostRequest()
13   {
14     String req = PymolManager
15             .getPostRequest(new StructureCommand("foobar"));
16     assertEquals(req,
17             "<methodCall><methodName>foobar</methodName><params></params></methodCall>");
18
19     req = PymolManager
20             .getPostRequest(new StructureCommand("foobar", "blue", "all"));
21     assertEquals(req, "<methodCall><methodName>foobar</methodName><params>"
22             + "<parameter><value>blue</value></parameter>"
23             + "<parameter><value>all</value></parameter>"
24             + "</params></methodCall>");
25   }
26 }