-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
4 changed files
with
89 additions
and
78 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
src/test/java/no/entur/uttu/integration/AbstractGraphQLIntegrationTest.java
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
79 changes: 79 additions & 0 deletions
79
src/test/java/no/entur/uttu/integration/InputGenerators.java
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,79 @@ | ||
package no.entur.uttu.integration; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class InputGenerators { | ||
|
||
static @NotNull Map<String, Object> generateDayTypeInput() { | ||
return Map.of( | ||
"daysOfWeek", | ||
List.of("monday", "tuesday", "wednesday", "thursday", "friday"), | ||
"dayTypeAssignments", | ||
Map.of( | ||
"operatingPeriod", | ||
Map.of("fromDate", "2020-04-01", "toDate", "2020-05-01"), | ||
"isAvailable", | ||
true | ||
) | ||
); | ||
} | ||
|
||
static @NotNull Map<String, Object> generateFixedLineInput( | ||
String name, | ||
String networkId, | ||
String dayTypeRef | ||
) { | ||
return Map.of( | ||
"name", | ||
name, | ||
"publicCode", | ||
"TestFixedLine", | ||
"transportMode", | ||
"bus", | ||
"transportSubmode", | ||
"localBus", | ||
"networkRef", | ||
networkId, | ||
"operatorRef", | ||
"NOG:Operator:1", | ||
"journeyPatterns", | ||
List.of( | ||
Map.of( | ||
"pointsInSequence", | ||
List.of( | ||
Map.of( | ||
"quayRef", | ||
"NSR:Quay:494", | ||
"destinationDisplay", | ||
Map.of("frontText", "Første stopp") | ||
), | ||
Map.of("quayRef", "NSR:Quay:563") | ||
), | ||
"serviceJourneys", | ||
List.of( | ||
Map.of( | ||
"name", | ||
"Hverdager3-" + System.currentTimeMillis(), | ||
"dayTypesRefs", | ||
List.of(dayTypeRef), | ||
"passingTimes", | ||
List.of( | ||
Map.of("departureTime", "07:00:00"), | ||
Map.of("arrivalTime", "07:15:00") | ||
) | ||
) | ||
) | ||
) | ||
) | ||
); | ||
} | ||
|
||
static @NotNull Map<String, String> generateNetworkInput( | ||
String name, | ||
String authorityRef | ||
) { | ||
return Map.of("name", name, "authorityRef", authorityRef); | ||
} | ||
} |
6 changes: 2 additions & 4 deletions
6
src/test/java/no/entur/uttu/integration/NetworkGraphQLIntegrationTest.java
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