Skip to content

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

Merged
domesticmouse merged 2 commits intogooglemaps:masterfrom
domesticmouse:master
Feb 4, 2016
Merged

NPE check for route fares, and a better test for permanently closed.#128
domesticmouse merged 2 commits intogooglemaps:masterfrom
domesticmouse:master

Conversation

@domesticmouse
Copy link
Copy Markdown
Contributor

PTAL @markmcd

for (PlacesSearchResult result: response.results) {
assertNotNull(result);
if(result.permanentlyClosed) {
// test success condition
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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