Example #1
0
        public void When_not_speeding_DurationSpeeding_equals_zero()
        {
            var previousWayPoint = new WayPoint {
                TimeStamp = NonSpeedingWayPoint.TimeStamp.AddSeconds(-10)
            };
            var speedingDuration = WayPointsApi.CalculateDurationSpeedingTo(NonSpeedingWayPoint, previousWayPoint);

            Assert.AreEqual(new TimeSpan(0), speedingDuration);
        }
Example #2
0
        public void When_speeding_DurationSpeeding_equals_time_from_previous_WayPoint()
        {
            var previousWayPoint = new WayPoint {
                TimeStamp = SpeedingWayPoint.TimeStamp.AddSeconds(-10)
            };
            var speedingDuration = WayPointsApi.CalculateDurationSpeedingTo(SpeedingWayPoint, previousWayPoint);

            Assert.AreEqual(WayPointsApi.DurationTo(SpeedingWayPoint, previousWayPoint), speedingDuration);
        }