Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,6 @@ public MapboxMapMatching build() {
+ " request.");
}

if (coordinates.size() > 100) {
throw new ServicesException("Maximum of 100 coordinates are allowed for this API.");
}

if (radiuses != null && radiuses.length != coordinates.size()) {
throw new ServicesException(
"There must be as many radiuses as there are coordinates.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,6 @@ public void build_exceptionThrownWhenLessThanTwoCoordsProvided() throws Exceptio
mapMatching.executeCall();
}

@Test
public void build_throwsExceptionWhenCoordsOverOneHundred() throws Exception {
thrown.expect(ServicesException.class);
thrown.expectMessage(
startsWith("Maximum of 100 coordinates are allowed for this API."));
List<Point> coordinates = new ArrayList<>();
for (int i = 0; i < 101; i++) {
coordinates.add(Point.fromLngLat(1.0 + i, 2.0 + i));
}
MapboxMapMatching mapMatching = MapboxMapMatching.builder()
.coordinates(coordinates)
.baseUrl("https://foobar.com")
.accessToken(ACCESS_TOKEN)
.build();
mapMatching.executeCall();
}

@Test
public void build_throwsExceptionWhenNotMatchingRadiusesForEachCoord() throws Exception {
thrown.expect(ServicesException.class);
Expand Down