[InlineData(50.0, 10.0, 0, false, false, 16.653)] //to center // [InlineData(20.0, 18.3, 25, true, true, 35.85)]// due to rounding in plot coeficiant, // hand calcualated limiting distances may be different from our calcualted values. // But we are going to stick with the more precice calculated values public void TestCalculateLimitingDistance(double BAForFPS, double dbh, int slopePCT, bool isVar, bool isFace, double expected) { int sigDec = 3; var ld = CalculateLimitingDistance.Calculate(BAForFPS, dbh, slopePCT, isVar, isFace); ld = Math.Round(ld, sigDec); expected = Math.Round(expected, 3); ld.Should().Be(expected); }
//for tree to be in slope distance (first value) must be less than or equal to limiting distance (second value) //both values are round to two decimal places //here we test edge cases where both values should be determined to be equal public void TestDeterminTreeInOrOut(double slopeDistance, double limitingDistance, bool expectedResult) { CalculateLimitingDistance.DeterminTreeInOrOut(slopeDistance, limitingDistance).Should().Be(expectedResult); }