mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
update stub methods to clarify behavior
This commit is contained in:
@@ -19,12 +19,12 @@ export interface GetterSetterRepository extends GetterRepository {
|
||||
addOrUpdateOrderedStop(orderedStop: IOrderedStop): Promise<void>;
|
||||
addOrUpdateEta(eta: IEta): Promise<void>;
|
||||
|
||||
removeSystem(systemId: string): Promise<void>;
|
||||
removeRoute(routeId: string): Promise<void>;
|
||||
removeShuttle(shuttleId: string): Promise<void>;
|
||||
removeStop(stopId: string): Promise<void>;
|
||||
removeOrderedStop(stopId: string, routeId: string): Promise<void>;
|
||||
removeEta(shuttleId: string, stopId: string): Promise<void>;
|
||||
removeSystemIfExists(systemId: string): Promise<ISystem | null>;
|
||||
removeRouteIfExists(routeId: string): Promise<IRoute | null>;
|
||||
removeShuttleIfExists(shuttleId: string): Promise<IShuttle | null>;
|
||||
removeStopIfExists(stopId: string): Promise<IStop | null>;
|
||||
removeOrderedStopIfExists(stopId: string, routeId: string): Promise<IOrderedStop | null>;
|
||||
removeEtaIfExists(shuttleId: string, stopId: string): Promise<IEta | null>;
|
||||
|
||||
clearSystemData(): Promise<void>;
|
||||
clearRouteData(): Promise<void>;
|
||||
|
||||
@@ -148,24 +148,30 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async removeEta(shuttleId: string, stopId: string): Promise<void> {
|
||||
removeSystemIfExists(systemId: string): Promise<ISystem | null> {
|
||||
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() {
|
||||
this.systems = [];
|
||||
}
|
||||
@@ -189,4 +195,5 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
|
||||
public async clearStopData(): Promise<void> {
|
||||
this.stops = [];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user