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

Extract mapper for Transmodel bookWhen, new values for relativeDirection #6393

Open
wants to merge 2 commits into
base: dev-2.x
Choose a base branch
from

Conversation

leonardehrenfried
Copy link
Member

@leonardehrenfried leonardehrenfried commented Jan 17, 2025

bookWhen

@t2gran had to fix a bug I introduced in #6385 which I feel a bit bad about. In order for this to not repeat itself I extracted a mapper for the field in question and added lots and lots of tests.

The line coverage in the mapper is 100% and the branch coverage 93%.

New enum values for Transmodel's relativeDirection

In #6343 we introduced a new internal enum value for RelativeDirection. We don't want to expose the type ever in the API so I introduced mapper to get rid of it. In that process I noticed that there are unmapped enum values in the Transmodel API, which I also mapped away.

@t2gran has requested that instead we add the enum values to the API which I did.

There was already a test for the enum serialisation which also tests the new values.

Issue

Relates to #6384

Unit tests

Added.

Documentation

Javadoc.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 69.76%. Comparing base (1030408) to head (5639c31).

Files with missing lines Patch % Lines
...ner/apis/transmodel/mapping/BookingInfoMapper.java 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6393      +/-   ##
=============================================
+ Coverage      69.73%   69.76%   +0.02%     
- Complexity     18024    18034      +10     
=============================================
  Files           2057     2058       +1     
  Lines          76970    76973       +3     
  Branches        7846     7845       -1     
=============================================
+ Hits           53678    53697      +19     
+ Misses         20545    20528      -17     
- Partials        2747     2748       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardehrenfried leonardehrenfried changed the title Extract mapper for Transmodel bookWhen, add test Extract mapper for Transmodel bookWhen, new values for relativeDirection Jan 17, 2025
@optionsome optionsome requested review from t2gran and eibakke January 21, 2025 10:12
Copy link
Member

@t2gran t2gran left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this.

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

Successfully merging this pull request may close these issues.

2 participants