fix constructors

This commit is contained in:
2025-03-27 10:23:30 -07:00
parent fb58414ba3
commit ae30660095
2 changed files with 15 additions and 36 deletions

View File

@@ -8,6 +8,7 @@ import { TimedApiBasedShuttleRepositoryLoader } from "./loaders/TimedApiBasedShu
import { ETANotificationScheduler } from "./notifications/schedulers/ETANotificationScheduler";
import { loadShuttleTestData } from "./loaders/loadShuttleTestData";
import { AppleNotificationSender } from "./notifications/senders/AppleNotificationSender";
import { InMemoryNotificationRepository } from "./repositories/InMemoryNotificationRepository";
const typeDefs = readFileSync("./schema.graphqls", "utf8");
@@ -23,8 +24,14 @@ async function main() {
if (process.argv.length > 2 && process.argv[2] == "integration-testing") {
console.log("Using integration testing setup")
await loadShuttleTestData(repository);
const appleNotificationSender = new AppleNotificationSender(false);
notificationService = new ETANotificationScheduler(repository, appleNotificationSender);
const inMemoryNotificationRepository = new InMemoryNotificationRepository();
notificationService = new ETANotificationScheduler(
repository,
inMemoryNotificationRepository,
appleNotificationSender
);
} else {
const repositoryDataUpdater = new TimedApiBasedShuttleRepositoryLoader(
repository