JAL-1953 more progress on interfaces, jalview binding still problematic
[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.ext.treeviewer.ExternalTreeFrame;
7 import jalview.gui.Desktop;
8 import jalview.gui.JvOptionPane;
9
10 import org.testng.annotations.BeforeClass;
11 import org.testng.annotations.Test;
12
13 public abstract class TreeViewTest
14 {
15   Jalview jalview;
16
17   ExternalTreeFrame treeView;
18
19   @BeforeClass(alwaysRun = true)
20   public void setUpJvOptionPane()
21   {
22     JvOptionPane.setInteractiveMode(false);
23     JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
24   }
25
26   public abstract void setUpTree();
27
28   @BeforeClass(alwaysRun = true)
29   public void setUpJalview()
30   {
31     String[] args = new String[0];
32     Jalview.main(args);
33   }
34
35   public abstract void createTreeView();
36
37   @Test(groups = "Functional")
38   public void testTreeViewExists()
39   {
40     assertTrue(treeView != null);
41   }
42
43   @Test(groups = "Functional")
44   public void testTreeViewBoundToJalview()
45   {
46     assertTrue(treeView.getTopLevelAncestor() instanceof Desktop);
47   }
48
49   @Test(groups = "Functional")
50   public void testShowingTreeView()
51   {
52     assertTrue(treeView.isShowing());
53   }
54
55   @Test(groups = "Functional")
56   public abstract void testTreeLoaded();
57
58   @Test(groups = "Functional")
59   public abstract void testTreeTitle();
60
61   @Test(groups = "Functional")
62   public abstract void testExistingBranchName();
63
64   @Test(groups = "Functional")
65   public abstract void testChildNodesCount();
66
67   @Test(groups = "Functional")
68   public abstract void testChildToParentBranchLength();
69
70   @Test(groups = "Functional")
71   public abstract void testNodeToRootBranchLength();
72
73   @Test(groups = "Functional")
74   public abstract void testDistantNodeToRootBranchLength();
75 }