JAL-1333 test suite for key functionality of java interface to chimera
authorJim Procter <jprocter@Jims-MacBook-Pro-2.local>
Wed, 2 Jul 2014 22:35:09 +0000 (15:35 -0700)
committerJim Procter <jprocter@Jims-MacBook-Pro-2.local>
Wed, 2 Jul 2014 22:35:09 +0000 (15:35 -0700)
test/jalview/ext/rbvi/chimera/AllTests.java [new file with mode: 0644]
test/jalview/ext/rbvi/chimera/ChimeraConnect.java [new file with mode: 0644]

diff --git a/test/jalview/ext/rbvi/chimera/AllTests.java b/test/jalview/ext/rbvi/chimera/AllTests.java
new file mode 100644 (file)
index 0000000..1d14751
--- /dev/null
@@ -0,0 +1,13 @@
+package jalview.ext.rbvi.chimera;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses(
+{})
+public class AllTests
+{
+
+}
diff --git a/test/jalview/ext/rbvi/chimera/ChimeraConnect.java b/test/jalview/ext/rbvi/chimera/ChimeraConnect.java
new file mode 100644 (file)
index 0000000..658c9c6
--- /dev/null
@@ -0,0 +1,39 @@
+package jalview.ext.rbvi.chimera;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.junit.Test;
+
+import ext.edu.ucsf.rbvi.strucviz2.*;
+
+public class ChimeraConnect
+{
+
+  @Test
+  public void test()
+  {
+    StructureManager csm; 
+            ext.edu.ucsf.rbvi.strucviz2.ChimeraManager cm = new ChimeraManager(csm = new ext.edu.ucsf.rbvi.strucviz2.StructureManager(true));
+    assertTrue("Couldn't launch chimera",cm.launchChimera(csm.getChimeraPaths()));
+    
+    int n=0;
+    while (n++<100)
+    {
+      try { 
+        Thread.sleep(1000);
+      } catch (Exception q)
+      {
+        
+      }
+      Collection<ChimeraModel> cms = cm.getChimeraModels();
+      for (ChimeraModel cmod :cms) {
+        System.out.println(cmod.getModelName());
+      }
+    }
+    cm.exitChimera();
+  }
+
+}