From: kjvdheide Date: Wed, 25 Oct 2017 15:08:16 +0000 (+0100) Subject: Added branch name tests X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b671d89453a647c4787f37c92bbdb4239876b673;p=jalview.git Added branch name tests --- diff --git a/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java b/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java index 4fdc473..f7ec7d6 100644 --- a/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java +++ b/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java @@ -52,6 +52,7 @@ public class AptxJalviewTreeTest extends TreeViewTest similarityParams); } + @Override @BeforeClass(dependsOnMethods = { "setUpTree" }) public void createTreeView() { @@ -96,4 +97,19 @@ public class AptxJalviewTreeTest extends TreeViewTest // TODO Auto-generated method stub } + + + @Override + public void testInvalidBranchName() + { + // TODO Auto-generated method stub + + } + + @Override + public void testExistingBranchName() + { + // TODO Auto-generated method stub + + } } diff --git a/test/jalview/ext/archaeopteryx/AptxPhylogenyTreeTest.java b/test/jalview/ext/archaeopteryx/AptxPhylogenyTreeTest.java index 5e00496..bc908e2 100644 --- a/test/jalview/ext/archaeopteryx/AptxPhylogenyTreeTest.java +++ b/test/jalview/ext/archaeopteryx/AptxPhylogenyTreeTest.java @@ -58,6 +58,7 @@ public class AptxPhylogenyTreeTest extends TreeViewTest } + @Override @BeforeClass(dependsOnMethods = { "setUpJalview", "setUpTree" }) public void createTreeView() { @@ -89,6 +90,24 @@ public class AptxPhylogenyTreeTest extends TreeViewTest } @Override + @Test( + groups = "Functional", + expectedExceptions = IllegalArgumentException.class) + public void testInvalidBranchName() + { + tree.getNode("I shouldn't exist"); + + } + + @Override + @Test(groups = "Functional") + public void testExistingBranchName() + { + tree.getNode("leaf 2"); + + } + + @Override @Test(groups = "Functional") public void testTreeLoaded() { @@ -133,4 +152,5 @@ public class AptxPhylogenyTreeTest extends TreeViewTest + } diff --git a/test/jalview/ext/archaeopteryx/TreeViewTest.java b/test/jalview/ext/archaeopteryx/TreeViewTest.java index 972263d..013663e 100644 --- a/test/jalview/ext/archaeopteryx/TreeViewTest.java +++ b/test/jalview/ext/archaeopteryx/TreeViewTest.java @@ -27,6 +27,9 @@ public abstract class TreeViewTest Jalview.main(args); } + @BeforeClass(dependsOnMethods = { "setUpJalview", "setUpTree" }) + public abstract void createTreeView(); + @Test(groups = "Functional") public void testTreeViewExists() { @@ -45,10 +48,18 @@ public abstract class TreeViewTest assertTrue(treeView.isShowing()); } + @Test( + groups = "Functional", + expectedExceptions = IllegalArgumentException.class) + public abstract void testInvalidBranchName(); + @Test(groups = "Functional") public abstract void testTreeLoaded(); @Test(groups = "Functional") + public abstract void testExistingBranchName(); + + @Test(groups = "Functional") public abstract void testChildNodesCount(); @Test(groups = "Functional")