Closed leonardehrenfried closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 68.54%. Comparing base (
f535524
) to head (410284c
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@leonardehrenfried I think the idea looks good! But in general I would prefer composition in favor of inheritance. Specifically if we ever want to test gtfs and siri together it would get clunky with an abstract base class.
@habrahamsson-skanetrafiken I've changed the inheritance to composition. It's not super-elegant either but less bad than some other options. My intention is for the split between Siri and GTFS test environment to become unnecessary once I've extracted a common timetable snapshot manager.
Summary
As discussed in the realtime working group meeting, this introduces module tests for the GTFS-RT realtime code. They are ports of the existing tests but have been converted to use @habrahamsson-skanetrafiken's test environment code. This results in faster test execution and a less confusing debugging experience.
To make this possible, I extracted the bulk of the test environment into a base class which is subclassed by both the Siri and GTFS-RT test to add a few specific methods.
Unit tests
Well... yes.
Documentation
Javadoc for each test case.