Exemplo n.º 1
0
        public void FlightService_CalculateDistance(double latitude1, double longitude1, double latitude2, double longitude2, double distanceBetween)
        {
            var coordinate1 = new CoordinatesModel(latitude1, longitude1);
            var coordinate2 = new CoordinatesModel(latitude2, longitude2);

            var flightService = new FlightService();

            var resultingDistance = flightService.CalculateDistanceWithHaversineFormulae(coordinate1, coordinate2);

            Assert.AreEqual(distanceBetween, resultingDistance);
        }