2018-07-28 13:43:58 +02:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const a = require('assert')
|
2019-08-30 18:31:39 +02:00
|
|
|
const products = require('../../../p/bvg/products')
|
2018-07-28 13:43:58 +02:00
|
|
|
|
|
|
|
const {createWhen} = require('./util')
|
|
|
|
const {
|
|
|
|
station: createValidateStation,
|
|
|
|
journeyLeg: createValidateJourneyLeg,
|
|
|
|
departure: createValidateDeparture,
|
2018-12-30 13:52:34 +01:00
|
|
|
movement: createValidateMovement
|
2018-07-28 13:43:58 +02:00
|
|
|
} = require('./validators')
|
|
|
|
|
2022-04-23 14:40:51 +02:00
|
|
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
|
|
|
const when = createWhen('Europe/Berlin', 'de-DE', T_MOCK)
|
2018-07-28 13:43:58 +02:00
|
|
|
|
|
|
|
const cfg = {
|
|
|
|
when,
|
|
|
|
stationCoordsOptional: false,
|
|
|
|
products
|
|
|
|
}
|
|
|
|
|
|
|
|
// todo: coordsOptional = false
|
2021-05-20 16:40:36 +01:00
|
|
|
const validateStation = createValidateStation(cfg)
|
2018-07-28 13:43:58 +02:00
|
|
|
|
2021-05-20 16:40:36 +01:00
|
|
|
const validateJourneyLeg = createValidateJourneyLeg(cfg)
|
2018-07-28 13:43:58 +02:00
|
|
|
|
2021-05-20 16:40:36 +01:00
|
|
|
const validateDeparture = createValidateDeparture(cfg)
|
2018-07-28 13:43:58 +02:00
|
|
|
|
2021-05-20 16:40:36 +01:00
|
|
|
const validateMovement = createValidateMovement(cfg)
|
2018-07-28 13:43:58 +02:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
cfg,
|
|
|
|
validateStation,
|
|
|
|
validateJourneyLeg,
|
|
|
|
validateDeparture,
|
|
|
|
validateMovement
|
|
|
|
}
|