示例#1
0
        public void LatitudeAndLongitudeCalculationsWork(double lat, double lon, double boxEdgeLength, double eMinLat, double eMinLon, double eMaxLat, double eMaxLon, double percentErr)
        {
            EventsController ec = new EventsController();
            var geoBox          = ec.CalculateBoundingGeoBox((decimal)lat, (decimal)lon, boxEdgeLength);

            Assert.True(IsWithinPercentError((double)geoBox.MinLatitude, eMinLat, percentErr));
            Assert.True(IsWithinPercentError((double)geoBox.MinLongitude, eMinLon, percentErr));
            Assert.True(IsWithinPercentError((double)geoBox.MaxLatitude, eMaxLat, percentErr));
            Assert.True(IsWithinPercentError((double)geoBox.MaxLongitude, eMaxLon, percentErr));
        }