-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapbox/driving-traffic support added to the list of directions profil… #292
Conversation
…es; checks added for maximum number of coordinates provided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the traffic response is similar to the non-traffic response, still, and in case this changes in the future, how about adding a test like mentioned on #290 (comment)?
@@ -464,6 +465,18 @@ public MapboxDirections build() throws ServicesException { | |||
"You should provide at least two coordinates (from/to)."); | |||
} | |||
|
|||
|
|||
if (profile != null && profile.equals(DirectionsCriteria.PROFILE_DRIVING_TRAFFIC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srabenja Considering that profile
and coordinates
are required parameters, how about we add a check before these two to raise an exception if either is null
(or empty)?
@zugaldia I added the changes you mentioned |
@srabenja I see the fixture, but I see no tests using it? |
I have fixed a few documentation things, cleaned up the fixture, rewrote some exception messages to make it more clear what error occurred and lastly, added a few test. @zugaldia can you review this again? |
…es, and checks added for maximum number of coordinates that can be provided, as discussed with @zugaldia