test harness: abstracting import of BankService

This commit is contained in:
ms 2021-10-29 15:07:16 +02:00
parent 32318a80f4
commit 1419751bfb
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F

View File

@ -607,7 +607,12 @@ export namespace BankApi {
}
}
export class BankService implements BankServiceInterface {
/**
* Method explained here:
* https://github.com/microsoft/TypeScript/issues/2552
*/
module BankServices {
export class PybankService implements BankServiceInterface {
proc: ProcessWrapper | undefined;
static fromExistingConfig(gc: GlobalTestState): BankService {
@ -718,7 +723,10 @@ export class BankService implements BankServiceInterface {
const url = `http://localhost:${this.bankConfig.httpPort}/config`;
await pingProc(this.proc, url, "bank");
}
}
}
import BankService = BankServices.PybankService;
export { BankService };
export class FakeBankService {
proc: ProcessWrapper | undefined;