Skip to content

Commit

Permalink
Removed source from lookup constructor in US Reverse Geo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Amundson committed Jun 27, 2023
1 parent cd8dfbe commit 30ab755
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void send(Lookup lookup) throws SmartyException, IOException, Interrupted
DecimalFormat decimalFormat = new DecimalFormat("#.########");
request.putParameter("latitude", decimalFormat.format(lookup.getLatitude()));
request.putParameter("longitude", decimalFormat.format(lookup.getLongitude()));
request.putParameter("source", getSource();
request.putParameter("source", getSource());

Response httpResponse = this.sender.send(request);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ public class Lookup implements Serializable {

public Lookup() { this.response = new SmartyResponse(); }

public Lookup(double latitude, double longitude, String source) {
public Lookup(double latitude, double longitude) {
this();
this.latitude = latitude;
this.longitude = longitude;
this.source = source;
}

public Double getLatitude() { return this.latitude; }
Expand All @@ -29,6 +28,8 @@ public Lookup(double latitude, double longitude, String source) {

public String getSource() { return this.source; }

public void setSource(String source) { this.source = source; }

public SmartyResponse getResponse() { return this.response; }

public void setResponse(SmartyResponse response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void testAddressLookupSerializedAndSentWithContext() throws Exception {
Lookup lookup = new Lookup(44.888888888, -111.111111111);
client.send(lookup);

assertEquals("http://localhost/lookup?latitude=44.88888889&longitude=-111.11111111", capturingSender.getRequest().getUrl());
assertEquals("http://localhost/lookup?latitude=44.88888889&longitude=-111.11111111&source=", capturingSender.getRequest().getUrl());
}

//endregion
Expand Down

0 comments on commit 30ab755

Please sign in to comment.