public void Get() { var userLocation = "Chicago,IL"; var userGeoLocation = GoogleService.GetLatAndLong(userLocation); var userLat = userGeoLocation.results.FirstOrDefault().geometry.location.lat; var userLong = userGeoLocation.results.FirstOrDefault().geometry.location.lng; var coordinates = Algorithm.PlotCordinates(userLat, userLong, 100); var states = Algorithm.GetStatesFromCordinates(coordinates); Assert.NotEmpty(states); }
public void GetVertexFromCircumference() { Stopwatch stopwatch = Stopwatch.StartNew(); var userLocation = "Chicago,IL"; var userGeoLocation = GoogleService.GetLatAndLong(userLocation); var userLat = userGeoLocation.results.FirstOrDefault().geometry.location.lat; var userLong = userGeoLocation.results.FirstOrDefault().geometry.location.lng; var coordinates = Algorithm.CircumferenceVertexes(userLat, userLong, 500); var states = Algorithm.GetStatesFromCordinates(coordinates); var cordinatesInCircle = Algorithm.PointOnCircle(userLat, userLong, 500); var foundStates = Algorithm.GetStatesFromCordinates(cordinatesInCircle); stopwatch.Stop(); var timeTaken = stopwatch.Elapsed; }