From 6a9def7119ce1f0057a0fd686b4d3f2acb4c32fa Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Wed, 25 Oct 2017 19:15:53 +0100 Subject: [PATCH] Implemented distance tests --- .../ext/archaeopteryx/AptxJalviewTreeTest.java | 38 ++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) 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 - - } - } -- 1.7.10.2