diff --git a/src/entities/InterchangeSystem.ts b/src/entities/InterchangeSystem.ts index 5a2dc9f..106ea01 100644 --- a/src/entities/InterchangeSystem.ts +++ b/src/entities/InterchangeSystem.ts @@ -5,6 +5,7 @@ import { UnoptimizedInMemoryShuttleRepository } from "../repositories/Unoptimize import { RedisNotificationRepository } from "../repositories/RedisNotificationRepository"; import { NotificationRepository } from "../repositories/NotificationRepository"; import { ShuttleGetterSetterRepository } from "../repositories/ShuttleGetterSetterRepository"; +import { InMemoryNotificationRepository } from "../repositories/InMemoryNotificationRepository"; export interface InterchangeSystemBuilderArguments { name: string; @@ -35,15 +36,14 @@ export class InterchangeSystem { * Construct an instance of the class where all composited * classes are correctly linked. * @param args - * @param notificationRepository */ - static build( + static buildForTesting( args: InterchangeSystemBuilderArguments, - notificationRepository: NotificationRepository = new RedisNotificationRepository() ) { const shuttleRepository = new UnoptimizedInMemoryShuttleRepository(); const shuttleDataLoader = new TimedApiBasedShuttleRepositoryLoader(args.passioSystemId, shuttleRepository); + const notificationRepository = new InMemoryNotificationRepository(); const notificationScheduler = new ETANotificationScheduler(shuttleRepository, notificationRepository); return new InterchangeSystem( diff --git a/test/testHelpers/apolloTestServerHelpers.ts b/test/testHelpers/apolloTestServerHelpers.ts index 6db5542..731ae98 100644 --- a/test/testHelpers/apolloTestServerHelpers.ts +++ b/test/testHelpers/apolloTestServerHelpers.ts @@ -24,9 +24,8 @@ const systemInfoForTesting = { }; export function buildSystemForTesting() { - return InterchangeSystem.build( + return InterchangeSystem.buildForTesting( systemInfoForTesting, - new InMemoryNotificationRepository() ); }