Commit 7fcc12ec authored by rhaase's avatar rhaase
Browse files

added actual assert to prove the test is passing

parent a4aedd7b
......@@ -13,6 +13,8 @@ import sc.fiji.analyzeSkeleton.Edge;
import java.awt.*;
import static junit.framework.TestCase.assertTrue;
/**
* Author: Robert Haase, Scientific Computing Facility, MPI-CBG Dresden, rhaase@mpi-cbg.de
* Date: September 2016
......@@ -49,9 +51,14 @@ public class PruningTest {
PathDrawer.drawAllPathsToLargestJunction(skeletonAnalyser, target, Color.green);
System.out.println("Minimum Edge length: " + getMinimumEdgeLength(skeletonAnalyser));
SkeletonAnalyser skeletonAnalyser2 = SkeletonAnalyser.cutLeafEdgesShorterThan(skeletonAnalyser, 5);
double minimumLengthConstraint = 5;
SkeletonAnalyser skeletonAnalyser2 = SkeletonAnalyser.cutLeafEdgesShorterThan(skeletonAnalyser, minimumLengthConstraint);
PathDrawer.drawAllPathsToLargestJunction(skeletonAnalyser2, target, Color.red);
System.out.println("Minimum Edge length: " + getMinimumEdgeLength(skeletonAnalyser2));
double newMinmumLength = getMinimumEdgeLength(skeletonAnalyser2);
System.out.println("Minimum Edge length: " + newMinmumLength);
assertTrue(newMinmumLength <= minimumLengthConstraint);
new WaitForUserDialog("Holla die Waldfee").show();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment