-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: change naming of fakes to fakes * chore: use the new fakes
- Loading branch information
1 parent
968643d
commit 755203c
Showing
6 changed files
with
35 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...time/test/mocks/NativeConfigAccessMock.ts → ...est/lib/natives/FakeNativeConfigAccess.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/test/mocks/NativeDatabaseFactoryMock.ts → .../lib/natives/FakeNativeDatabaseFactory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
.../test/mocks/NativeDeviceInfoAccessMock.ts → ...lib/natives/FakeNativeDeviceInfoAccess.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...est/mocks/NativeNotificationAccessMock.ts → ...b/natives/FakeNativeNotificationAccess.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
import { ILogger } from "@js-soft/logging-abstractions"; | ||
import { Result } from "@js-soft/ts-utils"; | ||
import { INativeNotificationAccess, INativeNotificationScheduleOptions } from "../../src"; | ||
import { INativeNotificationAccess, INativeNotificationScheduleOptions } from "../../../src"; | ||
|
||
export class NativeNotificationAccessMock implements INativeNotificationAccess { | ||
export class FakeNativeNotificationAccess implements INativeNotificationAccess { | ||
public constructor(private readonly logger: ILogger) {} | ||
|
||
public schedule(title: string, body: string, options?: INativeNotificationScheduleOptions): Promise<Result<number>> { | ||
this.logger.info(`NativeNotificationAccessMock.schedule(${title},${body},${options})`); | ||
this.logger.info(`NativeNotificationAccess.schedule(${title},${body},${options})`); | ||
|
||
return Promise.resolve(Result.ok(0)); | ||
} | ||
|
||
public update(id: number, title: string, body: string, options?: INativeNotificationScheduleOptions): Promise<Result<void>> { | ||
this.logger.info(`NativeNotificationAccessMock.update(${id},${title},${body},${options})`); | ||
this.logger.info(`NativeNotificationAccess.update(${id},${title},${body},${options})`); | ||
return Promise.resolve(Result.ok(undefined)); | ||
} | ||
|
||
public clear(id: number): Promise<Result<void>> { | ||
this.logger.info(`NativeNotificationAccessMock.clear(${id})`); | ||
this.logger.info(`NativeNotificationAccess.clear(${id})`); | ||
return Promise.resolve(Result.ok(undefined)); | ||
} | ||
|
||
public clearAll(): Promise<Result<void>> { | ||
this.logger.info("NativeNotificationAccessMock.clearAll()"); | ||
this.logger.info("NativeNotificationAccess.clearAll()"); | ||
return Promise.resolve(Result.ok(undefined)); | ||
} | ||
|
||
public getAll(): Promise<Result<number[]>> { | ||
this.logger.info("NativeNotificationAccessMock.getAll()"); | ||
this.logger.info("NativeNotificationAccess.getAll()"); | ||
return Promise.resolve(Result.ok([0])); | ||
} | ||
|
||
public init(): Promise<Result<void>> { | ||
this.logger.info("NativeNotificationAccessMock.init()"); | ||
this.logger.info("NativeNotificationAccess.init()"); | ||
return Promise.resolve(Result.ok(undefined)); | ||
} | ||
} |