Skip to content
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

NPE check for route fares, and a better test for permanently closed. #128

Merged
merged 2 commits into from
Feb 4, 2016
Merged

NPE check for route fares, and a better test for permanently closed. #128

merged 2 commits into from
Feb 4, 2016

Conversation

domesticmouse
Copy link
Contributor

PTAL @markmcd

for (PlacesSearchResult result: response.results) {
assertNotNull(result);
if(result.permanentlyClosed) {
// test success condition
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit: you'd usually test success conditions with an assert statement, e.g. assertTrue(result.permanentlyClosed).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had to water the test down from asserting the first returned result for the query is permanently closed, to at least one of the returned result set is permanently closed. Because data.

@markmcd
Copy link
Contributor

markmcd commented Feb 4, 2016

LGTM

domesticmouse added a commit that referenced this pull request Feb 4, 2016
NPE check for route fares, and a better test for permanently closed.
@domesticmouse domesticmouse merged commit 0207a4d into googlemaps:master Feb 4, 2016
@markmcd
Copy link
Contributor

markmcd commented Feb 4, 2016

Ahh I missed the outer loop. Makes sense.

On Thu, 4 Feb 2016, 17:53 Brett Morgan notifications@github.com wrote:

Merged #128
#128.


Reply to this email directly or view it on GitHub
#128 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants