Commit 21026f2
Fix NavigationModuleKoinTest: correct assertion for InOut path reservation
The test incorrectly assumed InOut elements don't have semaphores and expected
isPathReservedForTrain() to return false. However, InOut extends OrientedNodeCell
which implements OrientedPathSeparator and contains both inSemaphore and outSemaphore.
When a path is reserved for a train, isPathReservedForTrain() should correctly
return true, not false. The previous false result was likely due to a bug that
has been fixed by recent refactoring (Issue #350 parameter cleanup).
This fixes the failing integration test:
- NavigationModuleKoinTest > TrainNavigationService is functional within scoped context()
- Expected: false, Actual: true (at line 154)
The correct behavior is to return true when the path IS reserved.
Co-authored-by: bedaHovorka <bedaHovorka@users.noreply.github.com>1 parent 1cdfad3 commit 21026f2
1 file changed
Lines changed: 2 additions & 0 deletions
File tree
- src/test/kotlin/cz/vutbr/fit/interlockSim/di
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
0 commit comments