{
public static MainFrame createInstance(Phylogeny[] aptxTrees)
{
- return createAptxFrame(aptxTrees);
+ return createBoundAptxFrame(aptxTrees);
}
{
Phylogeny[] aptxTrees = { aptxTree }; // future possibility to load in
// several trees simultaneously
- return createAptxFrame(aptxTrees);
+ return createBoundAptxFrame(aptxTrees);
}
Phylogeny[] aptxTrees = { aptxTree }; // future possibility to load in
// several trees simultaneously
- return createAptxFrame(aptxTrees);
+ return createBoundAptxFrame(aptxTrees);
}
- private static MainFrame createAptxFrame(Phylogeny[] aptxTrees)
+ private static MainFrame createBoundAptxFrame(Phylogeny[] aptxTrees)
{
MainFrame aptxApp = Archaeopteryx.createApplication(aptxTrees,
"_aptx_jalview_configuration_file", null);
package jalview.ext.archaeopteryx;
+import static org.testng.Assert.assertTrue;
+
+import jalview.bin.Jalview;
+import jalview.gui.Desktop;
import jalview.gui.JvOptionPane;
import org.forester.archaeopteryx.MainFrame;
+import org.forester.archaeopteryx.TreePanel;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyNode;
import org.testng.annotations.BeforeClass;
final PhylogenyNode leaf1cNode = new PhylogenyNode("leaf 1c");
+ MainFrame aptx;
+
+ TreePanel treePanel;
+
+ Jalview jalview;
+
+ @BeforeClass(alwaysRun = true)
+ public void setUpTrees()
{
ancestor1Node.addAsChild(leaf1aNode);
ancestor1Node.addAsChild(leaf1bNode);
}
@BeforeClass(alwaysRun = true)
+ public void setUpJalview()
+ {
+ String[] args = new String[0];
+ Jalview.main(args);
+ aptx = ArchaeopteryxInit.createInstance(phy);
+ }
+
+ @BeforeClass(alwaysRun = true)
public void setUpJvOptionPane()
{
JvOptionPane.setInteractiveMode(false);
}
@Test(groups = "Functional")
+ public void testAptxExists()
+ {
+ assertTrue(aptx != null);
+ }
+
+ @Test(groups = "Functional")
+ public void testAptxBoundToJalview()
+ {
+ assertTrue(aptx.getTopLevelAncestor() instanceof Desktop);
+ }
+
+ @Test(groups = "Functional")
public void testShowingTree()
{
- MainFrame aptx = ArchaeopteryxInit.createInstance(phy);
+ assertTrue(aptx.isShowing());
}
+ // @Test(groups = "Functional")
+ // public void testCorrectBranchLengths()
+ //
+ // {
+ // aptx.getMainPanel().getTabbedPane().setSelectedIndex(0); // select the
+ // // first
+ // // (and only) tree
+ // // panel
+ // treePanel = aptx.getMainPanel().getCurrentTreePanel();
+ //
+ // System.out.println(treePanel);
+ //
+ //
+ //
+ // }
+
+
+
}