Skip to content

Commit

Permalink
add test for /contributions/count/density
Browse files Browse the repository at this point in the history
  • Loading branch information
FabiKo117 committed Feb 19, 2021
1 parent 5116db3 commit 8b09173
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1152,4 +1152,17 @@ public void countContributionsToHeidelbergCastleTest() {
assertEquals(16, response.getBody().get("result").get(0).get("value").asInt());
}

@Test
public void countDensityOfContributionsToShopsInOldtownHeidelbergTest() {
TestRestTemplate restTemplate = new TestRestTemplate();
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
map.add("bboxes", "8.69282,49.40766,8.71673,49.4133");
map.add("time", "2018-01-01,2019-01-01");
map.add("filter", "shop=* and type:node");
ResponseEntity<JsonNode> response = restTemplate
.postForEntity(server + port + "/contributions/count/density", map, JsonNode.class);
assertEquals(85.45, response.getBody().get("result").get(0).get("value").asDouble(),
deltaPercentage);
}

}

0 comments on commit 8b09173

Please sign in to comment.