From: Jim Procter Date: Wed, 2 Jul 2014 22:35:09 +0000 (-0700) Subject: JAL-1333 test suite for key functionality of java interface to chimera X-Git-Tag: Jalview_2_9~179^2~18 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d0daeb9399f3effac613d8df8431eaebf01a851a;p=jalview.git JAL-1333 test suite for key functionality of java interface to chimera --- diff --git a/test/jalview/ext/rbvi/chimera/AllTests.java b/test/jalview/ext/rbvi/chimera/AllTests.java new file mode 100644 index 0000000..1d14751 --- /dev/null +++ b/test/jalview/ext/rbvi/chimera/AllTests.java @@ -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 index 0000000..658c9c6 --- /dev/null +++ b/test/jalview/ext/rbvi/chimera/ChimeraConnect.java @@ -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 cms = cm.getChimeraModels(); + for (ChimeraModel cmod :cms) { + System.out.println(cmod.getModelName()); + } + } + cm.exitChimera(); + } + +}