MockDataConnectorClient

Use this for writing automated tests for your data connector

Extends


Constructors

new MockDataConnectorClient()

new MockDataConnectorClient(): MockDataConnectorClient

Returns

MockDataConnectorClient

Overrides

DataConnectorClient.constructor


Properties

dataSourceClient

readonly dataSourceClient: MockDataSourceClient;

set properties on this to modify how data source updates are mocked


urls

urls: object = LUCID_URLS;

api

api: string;

main

main: string;

Inherited from

DataConnectorClient.urls


Methods

getPublicKey()

getPublicKey(): Promise<string>

Mocked version returns an empty string

Returns

Promise<string>

Overrides

DataConnectorClient.getPublicKey


getSignatureValidator()

getSignatureValidator(): Promise<SignatureValidator>

Mocked version just always returns successful

Returns

Promise<SignatureValidator>

Overrides

DataConnectorClient.getSignatureValidator


parseActions()

parseActions<P>(
   url, 
   headers, 
   actions, 
patchParser): Promise<undefined | DataConnectorAction[]>

Validate and parse an action request from Lucid

Type parameters

Type parameter
P extends Patch

Parameters

ParameterType
urlstring
headersRecord<string, unknown>
actionsunknown
patchParserPatchParser<P>

Returns

Promise<undefined | DataConnectorAction[]>

Inherited from

DataConnectorClient.parseActions