File tree Expand file tree Collapse file tree
services-optimization/src
main/java/com/mapbox/api/optimization/v1
test/java/com/mapbox/api/optimization/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -480,8 +480,6 @@ public MapboxOptimization build() {
480480 if (coordinates == null || coordinates .size () < 2 ) {
481481 throw new ServicesException ("At least two coordinates must be provided with your API"
482482 + "request." );
483- } else if (coordinates .size () > 12 ) {
484- throw new ServicesException ("Maximum of 12 coordinates are allowed for this API." );
485483 }
486484
487485 coordinates (formatCoordinates (coordinates ));
Original file line number Diff line number Diff line change @@ -98,21 +98,6 @@ public void build_invalidAccessTokenExceptionThrown() throws Exception {
9898 .coordinate (Point .fromLngLat (1.0 , 1.0 ))
9999 .build ();
100100 }
101- @ Test
102- public void build_doesThrowTooManyCoordinatesException () throws ServicesException {
103- int total = 13 ;
104- List <Point > points = new ArrayList <>();
105- for (int i = 0 ; i < total ; i ++) {
106- // Fake too many positions
107- points .add (Point .fromLngLat (1.0 , 1.0 ));
108- }
109- thrown .expect (ServicesException .class );
110- thrown .expectMessage (startsWith ("Maximum of 12 coordinates are allowed for this API" ));
111- MapboxOptimization .builder ()
112- .coordinates (points )
113- .accessToken (ACCESS_TOKEN )
114- .build ();
115- }
116101
117102 @ Test
118103 public void build_doesAddCoordinatesToUrl () throws Exception {
You can’t perform that action at this time.
0 commit comments