public void arithmaticAdd_computesCorrectElevation_whenBothProfilesAreOnVerticalCurves_subtract()
        {
            CogoStation sta = new CogoStation(1950.0);
             double el1 = (double)profile1.getElevation(sta);
             double el2 = (double)profile2.getElevation(sta);
             double expectedValue = el1 - el2;

             resultingProfile = Profile.arithmaticAddProfile(profile1, profile2, -1.0);
             double computedElevation = (double)resultingProfile.getElevation(sta);

             Assert.AreEqual(expectedValue, computedElevation, doubleDelta);
        }
        public void arithmaticAdd_computesCorrectElevation_whenOnTangentAndTangent()
        {
            CogoStation sta = new CogoStation(1100.0);
             double el1 = (double)profile1.getElevation(sta);
             double el2 = (double)profile2.getElevation(sta);
             double expectedValue = el1 + el2;

             resultingProfile = Profile.arithmaticAddProfile(profile1, profile2, 1.0);
             double computedElevation = (double)resultingProfile.getElevation(sta);

             Assert.AreEqual(expectedValue, computedElevation, doubleDelta);
        }
        public void Profile_Constraints_unconstrainedSingleValue_getValuePastEnd_simple()
        {
            pfl21 = null;
             pfl21 = new Profile((CogoStation)0.0, (CogoStation)0.0, 12.0, unconstrained: true);

             double expected = 12.0;
             double? actual = pfl21.getElevation((CogoStation)1000.0);
             Assert.IsNotNull(actual);
             Assert.AreEqual(expected, actual, 0.000001);
        }
        public void Profile_Constraints_constrainedSingleValue_getValuePastEnd()
        {
            pfl21 = null;
             pfl21 = new Profile((CogoStation)0.0, (CogoStation)0.0, 12.0, unconstrained: false);

             double? actual = pfl21.getElevation((CogoStation)1000.0);
             Assert.IsNull(actual);
        }
        public void Profile_Constraints_constrainedBothUnconstrainedEnd_getValueAfterEnd_is14_complex()
        {
            pfl21 = null;
             pfl21 = new Profile((CogoStation)1000.0, (CogoStation)2000.0, 12.0, true);

             pfl21.appendStationAndElevation((CogoStation)2100.0, 18.0);
             pfl21.appendStationAndElevation((CogoStation)2200.0, 20.0);
             pfl21.appendStationAndElevation((CogoStation)2300.0, 14.0);

             double? actual = pfl21.getElevation((CogoStation)2150.0);
             double expected = 19.0;
             Assert.AreEqual(expected, actual, 0.000001);

             actual = pfl21.getElevation((CogoStation)500.0);
             Assert.IsNotNull(actual);
             expected = 12.0;
             Assert.AreEqual(expected, actual, 0.000001);
        }
        public void Profile_Constraints_constrainedBeginUnconstrainedEnd_getValueBeforeBegin_isNull()
        {
            pfl21 = null;
             pfl21 = new Profile((CogoStation)1000.0, (CogoStation)2000.0, 12.0);
             pfl21.EndIsUnconstrained = true;

             double? actual = pfl21.getElevation((CogoStation)500.0);
             Assert.IsNull(actual);
        }
        public void Profile_Constraints_constrainedBeginUnconstrainedEnd_getValueAfterEnd_is12()
        {
            pfl21 = null;
             pfl21 = new Profile((CogoStation)1000.0, (CogoStation)2000.0, 12.0);
             pfl21.EndIsUnconstrained = true;

             double? actual = pfl21.getElevation((CogoStation)2500.0);
             Assert.IsNotNull(actual);
             double expected = 12.0;
             Assert.AreEqual(expected, actual, 0.000001);
        }