X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=test%2Fjalview%2Fext%2Farchaeopteryx%2FTreeViewTest.java;fp=test%2Fjalview%2Fext%2Farchaeopteryx%2FTreeViewTest.java;h=4bbe140dbb032323ba665d8bac237426f6ead8f5;hp=0000000000000000000000000000000000000000;hb=f96e6a945e2df8a844f428c08cfc08210d937fc0;hpb=11346f873e4ecb2d191499fd1d52b8de07a65bf3 diff --git a/test/jalview/ext/archaeopteryx/TreeViewTest.java b/test/jalview/ext/archaeopteryx/TreeViewTest.java new file mode 100644 index 0000000..4bbe140 --- /dev/null +++ b/test/jalview/ext/archaeopteryx/TreeViewTest.java @@ -0,0 +1,76 @@ +package jalview.ext.archaeopteryx; + +import static org.testng.Assert.assertTrue; + +import jalview.bin.Jalview; +import jalview.gui.Desktop; +import jalview.gui.JvOptionPane; + +import javax.swing.JInternalFrame; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +public abstract class TreeViewTest +{ + Jalview jalview; + + JInternalFrame treeView; + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + + public abstract void setUpTree(); + + @BeforeClass(alwaysRun = true) + public void setUpJalview() + { + String[] args = new String[0]; + Jalview.main(args); + } + + public abstract void createTreeView(); + + @Test(groups = "Functional") + public void testTreeViewExists() + { + assertTrue(treeView != null); + } + + @Test(groups = "Functional") + public void testTreeViewBoundToJalview() + { + assertTrue(treeView.getTopLevelAncestor() instanceof Desktop); + } + + @Test(groups = "Functional") + public void testShowingTreeView() + { + assertTrue(treeView.isShowing()); + } + + @Test(groups = "Functional") + public abstract void testTreeLoaded(); + + @Test(groups = "Functional") + public abstract void testTreeTitle(); + + @Test(groups = "Functional") + public abstract void testExistingBranchName(); + + @Test(groups = "Functional") + public abstract void testChildNodesCount(); + + @Test(groups = "Functional") + public abstract void testChildToParentBranchLength(); + + @Test(groups = "Functional") + public abstract void testNodeToRootBranchLength(); + + @Test(groups = "Functional") + public abstract void testDistantNodeToRootBranchLength(); +}