Skip to content

Bug fixes and cleanups#135

Merged
domesticmouse merged 10 commits intogooglemaps:masterfrom
domesticmouse:master
Feb 25, 2016
Merged

Bug fixes and cleanups#135
domesticmouse merged 10 commits intogooglemaps:masterfrom
domesticmouse:master

Conversation

@domesticmouse
Copy link
Copy Markdown
Contributor

PTAL @samthor && @markmcd

.destination("paris metro pyramides")
.mode(TravelMode.TRANSIT)
.await();
assertNotNull(result);
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.

I know there's not, but I'm really sad there's not a better way to do this.

Well.. actually. You could just...

String localIcon = "";
try {
  localIcon = result.routes[0].legs[0].....
} catch (NullPointerException e) {
  fail("expected transit...");
}
assertEquals(...);

Just my 2c, up to you though.

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.

The long hand approach makes debugging easier. =)

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.

I wouldn't even catch the NPE. JUnit will catch and report the error.

For debugging purposes would it be cleaner to just log the request/response? Or use a breakpoint?

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.

Dropping most of the assertNotNull tests.

@samthor
Copy link
Copy Markdown
Contributor

samthor commented Feb 24, 2016

LGTM

assertNotNull(response);
assertNotNull(response.results);
assertTrue(175 < response.results.length);
assertTrue(100 < response.results.length);
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.

What happened to all of the pubs in Sydney? 😨

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.

Late night trading restrictions?

@domesticmouse
Copy link
Copy Markdown
Contributor Author

PTAL @broady

domesticmouse added a commit that referenced this pull request Feb 25, 2016
@domesticmouse domesticmouse merged commit b328517 into googlemaps:master Feb 25, 2016
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.

3 participants