diff --git a/test/repositories/UnoptimizedInMemoryShuttleRepositoryTests.test.ts b/test/repositories/UnoptimizedInMemoryShuttleRepositoryTests.test.ts index 835ef39..e1d9ba7 100644 --- a/test/repositories/UnoptimizedInMemoryShuttleRepositoryTests.test.ts +++ b/test/repositories/UnoptimizedInMemoryShuttleRepositoryTests.test.ts @@ -20,15 +20,15 @@ describe("UnoptimizedInMemoryRepository", () => { repository = new UnoptimizedInMemoryShuttleRepository(); }); - describe("getStopsBySystemId", () => { - test("gets stops by system ID", async () => { + describe("getStops", () => { + test("gets all stops in the repository", async () => { const mockStops = generateMockStops(); for (const stop of mockStops) { await repository.addOrUpdateStop(stop); } const result = await repository.getStops(); - expect(result).toEqual(mockStops.filter((stop) => stop.systemId === "sys1")); + expect(result).toEqual(mockStops); }); test("returns an empty list if there are no stops for the given system ID", async () => { @@ -53,7 +53,7 @@ describe("UnoptimizedInMemoryRepository", () => { }); }); - describe("getRoutesBySystemId", () => { + describe("getRoutes", () => { test("gets all routes for a specific system ID", async () => { const mockRoutes = generateMockRoutes(); for (const route of mockRoutes) { @@ -61,7 +61,7 @@ describe("UnoptimizedInMemoryRepository", () => { } const result = await repository.getRoutes(); - expect(result).toEqual(mockRoutes.filter((route) => route.systemId === "sys1")); + expect(result).toEqual(mockRoutes); }); test("returns an empty list if there are no routes for the system ID", async () => { @@ -85,7 +85,7 @@ describe("UnoptimizedInMemoryRepository", () => { expect(result).toBeNull(); }); }); - describe("getShuttlesBySystemId", () => { + describe("getShuttles", () => { test("gets all shuttles for a specific system ID", async () => { const mockShuttles = generateMockShuttles(); for (const shuttle of mockShuttles) { @@ -93,7 +93,7 @@ describe("UnoptimizedInMemoryRepository", () => { } const result = await repository.getShuttles(); - expect(result).toEqual(mockShuttles.filter((sh) => sh.systemId === "sys1")); + expect(result).toEqual(mockShuttles); }); test("returns an empty list if there are no shuttles for the system ID", async () => {