private RootObject Geocoding(string address, GoogleMapsResponseStatus status) { var response = _services.GeoLocation.Geocoding(address); BasicTestResponse(response, status); return(response.Result); }
private RootObject Geocoding(string latitude, string longitude, GoogleMapsResponseStatus status) { var response = _services.GeoLocation.Geocoding(latitude, longitude); BasicTestResponse(response, status); return(response.Result); }
private void BasicTestResponse(GoogleMapsServiceResponse <RootObject> response, GoogleMapsResponseStatus status) { Assert.IsNotNull(response, "response is null"); Assert.IsTrue(response.Status == status, "status is null"); if (status == GoogleMapsResponseStatus.OK) { Assert.IsNull(response.Exception); } else if (status == GoogleMapsResponseStatus.BAD_REQUEST_ERROR) { Assert.IsNotNull(response.Exception); } }