MockDeltaConnection Class
Mock implementation of IDeltaConnection for testing
This API is provided for existing users, but is not recommended for new users.
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
This API is provided for existing users, but is not recommended for new users.
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
This API is provided for existing users, but is not recommended for new users.
For more information about our API support guarantees, see here.
Signature
get connected(): boolean;
Type: boolean