-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test: Add unit tests for TimeTableViewModel (#515)
### TL;DR Enhanced the trip planning test infrastructure with improved fake builders and added comprehensive tests for journey caching. ### What changed? - Created a builder pattern for `FakeTripResponseBuilder` with configurable parameters - Added support for generating multiple journeys with realistic time sequences - Implemented tests for journey caching behavior in `TimeTableViewModel` - Added visibility annotations for testing internal components - Enhanced logging for journey time debugging ### How to test? 1. Run the TimeTableViewModelTest suite 2. Verify the new journey caching tests: - Test for basic journey updates - Test for started journey threshold handling - Test for journey sorting behavior 3. Validate the fake builder functionality with different journey configurations ### Why make this change? To improve test coverage and maintainability of the trip planning feature, particularly around journey caching logic. The enhanced fake builders provide more realistic test scenarios and make it easier to test complex journey combinations.
- Loading branch information
1 parent
e1beff2
commit 571f489
Showing
6 changed files
with
278 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.