Exemplo n.º 1
0
        public void HaversineDestination()
        {
            // ARRANGE
            GeoCoordinate Source      = new GeoCoordinate(40.7486, 5.4253);
            GeoCoordinate Destination = new GeoCoordinate(58.3838, 3.01412);

            // ACT
            ICoordinate CalculatedDestination = Source.FindDestination(355.84047394177765, 1967.0898177084771, DistanceType.KILOMETERS);

            // ASSERT
            Assert.Equal(Math.Round(Destination.Latitude.DecimalDegrees, 2), Math.Round(CalculatedDestination.GetLatitude().DecimalDegrees, 2));
            Assert.Equal(Math.Round(Destination.Longitude.DecimalDegrees, 2), Math.Round(CalculatedDestination.GetLongitude().DecimalDegrees, 2));
        }