From: kjvdheide Date: Wed, 25 Oct 2017 18:15:53 +0000 (+0100) Subject: Implemented distance tests X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6a9def7119ce1f0057a0fd686b4d3f2acb4c32fa;p=jalview.git Implemented distance tests --- diff --git a/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java b/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java index 5c0059d..51bfeeb 100644 --- a/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java +++ b/test/jalview/ext/archaeopteryx/AptxJalviewTreeTest.java @@ -1,5 +1,6 @@ package jalview.ext.archaeopteryx; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import jalview.analysis.NJTree; @@ -68,22 +69,36 @@ public class AptxJalviewTreeTest extends TreeViewTest } @Override + public void testTreeLoaded() + { + assertTrue(tree != null); + + } + + @Override public void testTreeTitle() { assertTrue(tree.getName().contains("Neighbour Joining Using BLOSUM62")); } + @Override public void testChildNodesCount() { - // TODO Auto-generated method stub + + } + + @Override + public void testExistingBranchName() + { + tree.getNode("Seq4"); } @Override public void testChildToParentBranchLength() { - // TODO Auto-generated method stub + assertEquals(tree.getNode("Seq1").getDistanceToParent(), 5.25); } @@ -99,32 +114,19 @@ public class AptxJalviewTreeTest extends TreeViewTest @Override public void testNodeToRootBranchLength() { - // TODO Auto-generated method stub + assertEquals(tree.getNode("Seq3").calculateDistanceToRoot(), 19.13); } @Override public void testDistantNodeToRootBranchLength() { - // TODO Auto-generated method stub - - } - - @Override - public void testTreeLoaded() - { - // TODO Auto-generated method stub + assertEquals(tree.getNode("Seq2").calculateDistanceToRoot(), + 3.75 + 35.75 + 19.13); } - @Override - public void testExistingBranchName() - { - // TODO Auto-generated method stub - - } - }