MockDeltaConnection Class
Mock implementation of IDeltaConnection for testing \
To use, import via @fluidframework/test-runtime-utils/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare class MockDeltaConnection implements IDeltaConnection
Implements: IDeltaConnection
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(submitFn, dirtyFn) | Beta |
Constructs a new instance of the MockDeltaConnection class |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
connected | Beta |
readonly |
boolean | |
handler | Beta |
IDeltaHandler | undefined |
Methods
Method | Alerts | Modifiers | Return Type | Description |
---|---|---|---|---|
applyStashedOp(content) | Beta |
unknown | ||
attach(handler) | Beta |
void | ||
dirty() | Beta |
void | ||
processMessages(messageCollection) | Beta |
void | ||
reSubmit(content, localOpMetadata, squash) | Beta |
void | ||
rollback(message, localOpMetadata) | Beta |
optional |
void | |
setConnectionState(connected) | Beta |
void | ||
submit(messageContent, localOpMetadata) | Beta |
number |
Constructor Details
(constructor)
Constructs a new instance of the MockDeltaConnection
class
For more information about our API support guarantees, see here.
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
For more information about our API support guarantees, see here.
Signature
get connected(): boolean;
Type: boolean
handler
For more information about our API support guarantees, see here.
Signature
handler: IDeltaHandler | undefined;
Type: IDeltaHandler | undefined
Method Details
applyStashedOp
For more information about our API support guarantees, see here.
Signature
applyStashedOp(content: any): unknown;
Parameters
Parameter | Type | Description |
---|---|---|
content | any |
Returns
Return type: unknown
attach
For more information about our API support guarantees, see here.
Signature
attach(handler: IDeltaHandler): void;
Parameters
Parameter | Type | Description |
---|---|---|
handler | IDeltaHandler |
dirty
For more information about our API support guarantees, see here.
Signature
dirty(): void;
processMessages
For more information about our API support guarantees, see here.
Signature
processMessages(messageCollection: IRuntimeMessageCollection): void;
Parameters
Parameter | Type | Description |
---|---|---|
messageCollection | IRuntimeMessageCollection |
reSubmit
For more information about our API support guarantees, see here.
Signature
reSubmit(content: any, localOpMetadata: unknown, squash?: boolean): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
content | any | ||
localOpMetadata | unknown | ||
squash | optional | boolean |
rollback
For more information about our API support guarantees, see here.
Signature
rollback?(message: any, localOpMetadata: unknown): void;
Parameters
Parameter | Type | Description |
---|---|---|
message | any | |
localOpMetadata | unknown |
setConnectionState
For more information about our API support guarantees, see here.
Signature
setConnectionState(connected: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
connected | boolean |
submit
For more information about our API support guarantees, see here.
Signature
submit(messageContent: any, localOpMetadata: unknown): number;
Parameters
Parameter | Type | Description |
---|---|---|
messageContent | any | |
localOpMetadata | unknown |
Returns
Return type: number