-
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.
- Loading branch information
1 parent
f382e4e
commit 77d8448
Showing
4 changed files
with
222 additions
and
6 deletions.
There are no files selected for viewing
28 changes: 26 additions & 2 deletions
28
core/test/src/commonTest/kotlin/xyz/ksharma/core/test/fakes/FakeTripPlanningService.kt
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
45 changes: 45 additions & 0 deletions
45
core/test/src/commonTest/kotlin/xyz/ksharma/core/test/fakes/FakeTripResponseBuilder.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package xyz.ksharma.core.test.fakes | ||
|
||
import xyz.ksharma.krail.trip.planner.network.api.model.StopType | ||
import xyz.ksharma.krail.trip.planner.network.api.model.TripResponse | ||
import xyz.ksharma.krail.trip.planner.network.api.model.TripResponse.StopSequence | ||
|
||
object FakeTripResponseBuilder { | ||
|
||
fun buildOriginStopSequence() = StopSequence( | ||
arrivalTimePlanned = "2024-09-24T19:00:00Z", | ||
arrivalTimeEstimated = "2024-09-24T19:10:00Z", | ||
departureTimePlanned = "2024-09-24T19:10:00Z", | ||
departureTimeEstimated = "2024-09-24T19:10:00Z", | ||
name = "Origin Stop", | ||
disassembledName = "Origin Name", | ||
id = "Origin_stop_id", | ||
type = StopType.STOP.type, | ||
) | ||
|
||
fun buildDestinationStopSequence() = StopSequence( | ||
arrivalTimePlanned = "2024-09-24T20:00:00Z", | ||
arrivalTimeEstimated = "2024-09-24T20:10:00Z", | ||
departureTimePlanned = "2024-09-24T20:10:00Z", | ||
departureTimeEstimated = "2024-09-24T20:10:00Z", | ||
name = "Destination Stop", | ||
disassembledName = "Destination Name", | ||
id = "Destination_stop_id", | ||
type = StopType.STOP.type, | ||
) | ||
|
||
fun buildTransportation() = TripResponse.Transportation( | ||
disassembledName = "Transportation Name", | ||
product = TripResponse.Product( | ||
productClass = 1, | ||
name = "Train", | ||
), | ||
destination = TripResponse.OperatorClass( | ||
name = "Destination Operator", | ||
id = "Destination Operator Id", | ||
), | ||
name = "Transportation Name", | ||
id = "Transportation Id", | ||
description = "Transportation Description", | ||
) | ||
} |
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