Merge branch 'kjvdh/features/PhylogenyViewer_tabbedsupport' into merge/2_11_2/kjvdh...
[jalview.git] / test / jalview / ext / archaeopteryx / TreeViewTest.java
diff --git a/test/jalview/ext/archaeopteryx/TreeViewTest.java b/test/jalview/ext/archaeopteryx/TreeViewTest.java
new file mode 100644 (file)
index 0000000..4bbe140
--- /dev/null
@@ -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();
+}