2018-10-25 17:26:26 +02:00
|
|
|
import Aquarius from "../../src/aquarius/Aquarius"
|
2018-11-12 12:09:42 +01:00
|
|
|
import DDO from "../../src/ddo/DDO"
|
|
|
|
|
|
|
|
const ddoStore: Map<string, any> = new Map<string, any>()
|
2018-10-17 18:24:01 +02:00
|
|
|
|
2018-10-25 17:26:26 +02:00
|
|
|
export default class AquariusMock extends Aquarius {
|
2018-10-17 18:24:01 +02:00
|
|
|
|
2018-10-26 10:40:46 +02:00
|
|
|
public async getAccessUrl(accessToken: any, payload: any): Promise<string> {
|
2018-10-17 18:24:01 +02:00
|
|
|
return "http://test/test"
|
|
|
|
}
|
2018-11-12 12:09:42 +01:00
|
|
|
|
|
|
|
public async storeDDO(ddo: DDO): Promise<DDO> {
|
|
|
|
ddoStore.set(ddo.id, ddo)
|
|
|
|
return ddo
|
|
|
|
}
|
|
|
|
|
|
|
|
public async retrieveDDO(did: string): Promise<DDO> {
|
|
|
|
return ddoStore.get(did)
|
|
|
|
}
|
2018-10-17 18:24:01 +02:00
|
|
|
}
|