mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
rename build method to buildForTesting
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user