Revert "JAL-2799 all tabs now get mouse listeners and Jalview switches tree view"
[jalview.git] / test / jalview / ext / archaeopteryx / TreeViewTest.java
1 package jalview.ext.archaeopteryx;
2
3 import static org.testng.Assert.assertTrue;
4
5 import jalview.bin.Jalview;
6 import jalview.gui.Desktop;
7 import jalview.gui.JvOptionPane;
8
9 import javax.swing.JInternalFrame;
10
11 import org.testng.annotations.BeforeClass;
12 import org.testng.annotations.Test;
13
14 public abstract class TreeViewTest
15 {
16   Jalview jalview;
17
18   JInternalFrame treeView;
19
20   @BeforeClass(alwaysRun = true)
21   public void setUpJvOptionPane()
22   {
23     JvOptionPane.setInteractiveMode(false);
24     JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
25   }
26
27   public abstract void setUpTree();
28
29   @BeforeClass(alwaysRun = true)
30   public void setUpJalview()
31   {
32     String[] args = new String[0];
33     Jalview.main(args);
34   }
35
36   public abstract void createTreeView();
37
38   @Test(groups = "Functional")
39   public void testTreeViewExists()
40   {
41     assertTrue(treeView != null);
42   }
43
44   @Test(groups = "Functional")
45   public void testTreeViewBoundToJalview()
46   {
47     assertTrue(treeView.getTopLevelAncestor() instanceof Desktop);
48   }
49
50   @Test(groups = "Functional")
51   public void testShowingTreeView()
52   {
53     assertTrue(treeView.isShowing());
54   }
55
56   @Test(groups = "Functional")
57   public abstract void testTreeLoaded();
58
59   @Test(groups = "Functional")
60   public abstract void testTreeTitle();
61
62   @Test(groups = "Functional")
63   public abstract void testExistingBranchName();
64
65   @Test(groups = "Functional")
66   public abstract void testChildNodesCount();
67
68   @Test(groups = "Functional")
69   public abstract void testChildToParentBranchLength();
70
71   @Test(groups = "Functional")
72   public abstract void testNodeToRootBranchLength();
73
74   @Test(groups = "Functional")
75   public abstract void testDistantNodeToRootBranchLength();
76 }