mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
do the same for mock routes
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { IShuttle, ISystem } from "../src/entities/entities";
|
||||
import { IRoute, IShuttle, ISystem } from "../src/entities/entities";
|
||||
|
||||
// Use a single set of generators in case any of the
|
||||
// interfaces change in the future
|
||||
|
||||
export function generateMockSystems(): ISystem[] {
|
||||
return [
|
||||
@@ -15,4 +17,12 @@ export function generateMockShuttles(): IShuttle[] {
|
||||
{ id: "sh2", name: "Shuttle B", routeId: "r2", systemId: "sys2", coordinates: { latitude: 15, longitude: 25 } },
|
||||
{ id: "sh3", name: "Shuttle C", routeId: "r3", systemId: "sys3", coordinates: { latitude: 30, longitude: 40 } },
|
||||
];
|
||||
}
|
||||
|
||||
export function generateMockRoutes(): IRoute[] {
|
||||
return [
|
||||
{ id: "r1", name: "Route 1", color: "red", systemId: "sys1", polylineCoordinates: [] },
|
||||
{ id: "r2", name: "Route 2", color: "blue", systemId: "sys2", polylineCoordinates: [] },
|
||||
{ id: "r3", name: "Route 3", color: "green", systemId: "sys3", polylineCoordinates: [] },
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user