update stub methods to clarify behavior

This commit is contained in:
2025-01-22 19:41:31 -08:00
parent f94c8dd629
commit f080c1ab5e
2 changed files with 20 additions and 13 deletions

View File

@@ -19,12 +19,12 @@ export interface GetterSetterRepository extends GetterRepository {
addOrUpdateOrderedStop(orderedStop: IOrderedStop): Promise<void>; addOrUpdateOrderedStop(orderedStop: IOrderedStop): Promise<void>;
addOrUpdateEta(eta: IEta): Promise<void>; addOrUpdateEta(eta: IEta): Promise<void>;
removeSystem(systemId: string): Promise<void>; removeSystemIfExists(systemId: string): Promise<ISystem | null>;
removeRoute(routeId: string): Promise<void>; removeRouteIfExists(routeId: string): Promise<IRoute | null>;
removeShuttle(shuttleId: string): Promise<void>; removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null>;
removeStop(stopId: string): Promise<void>; removeStopIfExists(stopId: string): Promise<IStop | null>;
removeOrderedStop(stopId: string, routeId: string): Promise<void>; removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null>;
removeEta(shuttleId: string, stopId: string): Promise<void>; removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null>;
clearSystemData(): Promise<void>; clearSystemData(): Promise<void>;
clearRouteData(): Promise<void>; clearRouteData(): Promise<void>;

View File

@@ -148,24 +148,30 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
} }
} }
removeSystemIfExists(systemId: string): Promise<ISystem | null> {
public async removeEta(shuttleId: string, stopId: string): Promise<void> { return Promise.resolve(null);
} }
public async removeOrderedStop(stopId: string, routeId: string): Promise<void> { removeRouteIfExists(routeId: string): Promise<IRoute | null> {
return Promise.resolve(null);
} }
public async removeRoute(routeId: string): Promise<void> { removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null> {
return Promise.resolve(null);
} }
public async removeShuttle(shuttleId: string): Promise<void> { removeStopIfExists(stopId: string): Promise<IStop | null> {
return Promise.resolve(null);
} }
public async removeStop(stopId: string): Promise<void> { removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null> {
return Promise.resolve(null);
} }
public async removeSystem(systemId: string): Promise<void> { removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null> {
return Promise.resolve(null);
} }
public async clearSystemData() { public async clearSystemData() {
this.systems = []; this.systems = [];
} }
@@ -189,4 +195,5 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
public async clearStopData(): Promise<void> { public async clearStopData(): Promise<void> {
this.stops = []; this.stops = [];
} }
} }