MockDeltaConnection Class
Mock implementation of IDeltaConnection for testing
Signature
export declare class MockDeltaConnection implements IDeltaConnection
Implements: IDeltaConnection
Constructors
| Constructor | Description |
|---|---|
| (constructor)(submitFn, dirtyFn) | Constructs a new instance of the MockDeltaConnection class |
Properties
| Property | Type | Description |
|---|---|---|
| connected | boolean | |
| handler | IDeltaHandler | undefined |
Methods
| Method | Return Type | Description |
|---|---|---|
| attach(handler) | void | |
| dirty() | void | |
| process(message, local, localOpMetadata) | void | |
| reSubmit(content, localOpMetadata) | void | |
| setConnectionState(connected) | void | |
| submit(messageContent, localOpMetadata) | number |
Constructor Details
(constructor)
Constructs a new instance of the MockDeltaConnection class
Signature
constructor(submitFn: (messageContent: any, localOpMetadata: unknown) => number, dirtyFn: () => void);
Parameters
| Parameter | Type | Description |
|---|---|---|
| submitFn | (messageContent: any, localOpMetadata: unknown) => number | |
| dirtyFn | () => void |
Property Details
connected
Signature
get connected(): boolean;
Type: boolean
handler
Signature
handler: IDeltaHandler | undefined;
Type: IDeltaHandler | undefined
Method Details
attach
Signature
attach(handler: IDeltaHandler): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| handler | IDeltaHandler |