MockDeltaManager Class
Mock implementation of IDeltaManager for testing that creates mock DeltaQueues 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 MockDeltaManager extends TypedEventEmitter<IDeltaManagerEvents> implements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
Extends: TypedEventEmitter<IDeltaManagerEvents>
Implements: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
Constructors
| Constructor | Alerts | Description |
|---|---|---|
| (constructor)(getClientId) | Beta |
Constructs a new instance of the MockDeltaManager class |
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| active | Beta |
boolean | ||
| clientDetails | Beta |
readonly |
IClientDetails | |
| clientSequenceNumber | Beta |
number | ||
| clientType | Beta |
readonly |
string | |
| disposed | Beta |
readonly |
any | |
| hasCheckpointSequenceNumber | Beta |
boolean | ||
| IDeltaSender | Beta |
readonly |
this | |
| inbound | Beta |
readonly |
MockDeltaQueue<ISequencedDocumentMessage> | |
| inboundSignal | Beta |
readonly |
MockDeltaQueue<ISignalMessage> | |
| initialSequenceNumber | Beta |
number | ||
| lastKnownSeqNumber | Beta |
readonly |
||
| lastMessage | Beta |
ISequencedDocumentMessage | undefined | ||
| lastSequenceNumber | Beta |
number | ||
| maxMessageSize | Beta |
readonly |
number | |
| minimumSequenceNumber | Beta |
number | ||
| outbound | Beta |
readonly |
MockDeltaQueue<IDocumentMessage[]> | |
| readOnlyInfo | Beta |
ReadOnlyInfo | ||
| serviceConfiguration | Beta |
readonly |
IClientConfiguration | |
| version | Beta |
readonly |
string |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| close() | Beta |
void | |
| dispose() | Beta |
void | |
| flush() | Beta |
void | |
| process(message) | Beta |
void | |
| submit(type, contents, batch, localOpMetadata) | Beta |
number | |
| submitSignal(content) | Beta |
void |
Constructor Details
(constructor)
Constructs a new instance of the MockDeltaManager class
For more information about our API support guarantees, see here.
Signature
constructor(getClientId?: (() => string | undefined) | undefined);
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| getClientId | optional | (() => string | undefined) | undefined |
Property Details
active
For more information about our API support guarantees, see here.
Signature
active: boolean;
Type: boolean
clientDetails
For more information about our API support guarantees, see here.
Signature
readonly clientDetails: IClientDetails;
Type: IClientDetails
clientSequenceNumber
For more information about our API support guarantees, see here.
Signature
clientSequenceNumber: number;
Type: number
clientType
For more information about our API support guarantees, see here.
Signature
readonly clientType: string;
Type: string
disposed
For more information about our API support guarantees, see here.
Signature
get disposed(): any;
Type: any
hasCheckpointSequenceNumber
For more information about our API support guarantees, see here.
Signature
hasCheckpointSequenceNumber: boolean;
Type: boolean
IDeltaSender
For more information about our API support guarantees, see here.
Signature
get IDeltaSender(): this;
Type: this
inbound
For more information about our API support guarantees, see here.
Signature
get inbound(): MockDeltaQueue<ISequencedDocumentMessage>;
Type: MockDeltaQueue<ISequencedDocumentMessage>
inboundSignal
For more information about our API support guarantees, see here.
Signature
get inboundSignal(): MockDeltaQueue<ISignalMessage>;
Type: MockDeltaQueue<ISignalMessage>
initialSequenceNumber
For more information about our API support guarantees, see here.
Signature
initialSequenceNumber: number;
Type: number
lastKnownSeqNumber
For more information about our API support guarantees, see here.
Signature
readonly lastKnownSeqNumber = 0;
lastMessage
For more information about our API support guarantees, see here.
Signature
lastMessage: ISequencedDocumentMessage | undefined;
Type: ISequencedDocumentMessage | undefined
lastSequenceNumber
For more information about our API support guarantees, see here.
Signature
lastSequenceNumber: number;
Type: number
maxMessageSize
For more information about our API support guarantees, see here.
Signature
readonly maxMessageSize: number;
Type: number
minimumSequenceNumber
For more information about our API support guarantees, see here.
Signature
minimumSequenceNumber: number;
Type: number
outbound
For more information about our API support guarantees, see here.
Signature
get outbound(): MockDeltaQueue<IDocumentMessage[]>;
Type: MockDeltaQueue<IDocumentMessage[]>
readOnlyInfo
For more information about our API support guarantees, see here.
Signature
readOnlyInfo: ReadOnlyInfo;
Type: ReadOnlyInfo
serviceConfiguration
For more information about our API support guarantees, see here.
Signature
get serviceConfiguration(): IClientConfiguration;
Type: IClientConfiguration
version
For more information about our API support guarantees, see here.
Signature
get version(): string;
Type: string
Method Details
close
For more information about our API support guarantees, see here.
Signature
close(): void;
dispose
For more information about our API support guarantees, see here.
Signature
dispose(): void;
flush
For more information about our API support guarantees, see here.
Signature
flush(): void;
process
For more information about our API support guarantees, see here.
Signature
process(message: ISequencedDocumentMessage): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| message | ISequencedDocumentMessage |
submit
For more information about our API support guarantees, see here.
Signature
submit(type: MessageType, contents: any, batch: boolean | undefined, localOpMetadata: any): number;
Parameters
| Parameter | Type | Description |
|---|---|---|
| type | MessageType | |
| contents | any | |
| batch | boolean | undefined | |
| localOpMetadata | any |
Returns
Return type: number
submitSignal
For more information about our API support guarantees, see here.
Signature
submitSignal(content: any): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| content | any |