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

Prevent conversion of non-plan OTP responses to POJO #74

Merged
merged 2 commits into from
Sep 15, 2020

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented Sep 11, 2020

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • [na] The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

This PR fixes #73. A new test class and a park_and_ride mock response are added to guard against #73.

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2020

Codecov Report

Merging #74 into dev will decrease coverage by 0.07%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev      #74      +/-   ##
============================================
- Coverage     31.94%   31.87%   -0.08%     
+ Complexity      207      203       -4     
============================================
  Files            81       81              
  Lines          2235     2237       +2     
  Branches        251      251              
============================================
- Hits            714      713       -1     
- Misses         1483     1485       +2     
- Partials         38       39       +1     
Impacted Files Coverage Δ Complexity Δ
...pplanner/middleware/otp/OtpDispatcherResponse.java 52.17% <33.33%> (-4.97%) 5.00 <1.00> (ø)
...ntripplanner/middleware/otp/response/Response.java 75.00% <0.00%> (-25.00%) 1.00% <0.00%> (-1.00%)
...ntripplanner/middleware/otp/response/TripPlan.java 83.33% <0.00%> (-16.67%) 1.00% <0.00%> (-1.00%)
...opentripplanner/middleware/otp/response/Place.java 30.00% <0.00%> (-10.00%) 3.00% <0.00%> (-1.00%)
...g/opentripplanner/middleware/otp/response/Leg.java 50.00% <0.00%> (-3.34%) 4.00% <0.00%> (-1.00%)
...tripplanner/middleware/otp/response/Itinerary.java 68.75% <0.00%> (-3.13%) 5.00% <0.00%> (-1.00%)
.../opentripplanner/middleware/otp/OtpDispatcher.java 13.79% <0.00%> (+13.79%) 1.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59c6324...a2a319a. Read the comment docs.

@evansiroky evansiroky removed their assignment Sep 12, 2020
Copy link
Contributor

@br648 br648 left a comment

Choose a reason for hiding this comment

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

One minor typo, but looks good so approving.


public class OtpDispatcherResponseTest {
@Test
public void toStringShouldExludeResponseFieldIfNotCallingPlan() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo Exlude: Exclude.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! Thanks.

@br648 br648 removed their assignment Sep 15, 2020
@binh-dam-ibigroup binh-dam-ibigroup merged commit a01b073 into dev Sep 15, 2020
@binh-dam-ibigroup binh-dam-ibigroup deleted the prevent-nonplan-pojo-errors branch September 15, 2020 20:36
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.

POJO conversion errors
5 participants