Esempio n. 1
0
        public void When_speeding_DistanceSpeeding_equals_distance_from_previous_WayPoint()
        {
            var previousWayPoint = new WayPoint {
                Position = new GpsCoords {
                    Lat = 59.38, Long = 18.0665
                }
            };
            var distance = WayPointsApi.CalculateDistanceSpeedingTo(SpeedingWayPoint, previousWayPoint);

            Assert.AreEqual(WayPointsApi.DistanceTo(SpeedingWayPoint, previousWayPoint), distance);
        }
Esempio n. 2
0
        public void When_not_speeding_DistanceSpeeding_equals_zero()
        {
            var previousWayPoint = new WayPoint {
                Position = new GpsCoords {
                    Lat = 59.38, Long = 18.0665
                }
            };
            var distance = WayPointsApi.CalculateDistanceSpeedingTo(NonSpeedingWayPoint, previousWayPoint);

            Assert.AreEqual(0.0, distance);
        }