MockContainerRuntime Class
Mock implementation of IContainerRuntime for testing basic submitting and processing of messages. If test specific logic is required, extend this class and add the logic there. For an example, take a look at MockContainerRuntimeForReconnection.
To use, import via @fluidframework/test-runtime-utils/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare class MockContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
Extends: TypedEventEmitter<IContainerRuntimeEvents>
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(dataStoreRuntime, factory, mockContainerRuntimeOptions, overrides) | Alpha |
Constructs a new instance of the MockContainerRuntime class |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
clientId | Alpha |
string | ||
dataStoreRuntime | Alpha |
readonly |
MockFluidDataStoreRuntime | |
deltaConnections | Deprecated , Alpha |
readonly |
MockDeltaConnection[] | |
deltaManager | Alpha |
readonly |
MockDeltaManager | |
factory | Alpha |
readonly |
MockContainerRuntimeFactory | |
isDirty | Alpha |
readonly |
boolean | |
outbox | Alpha |
readonly |
IInternalMockRuntimeMessage[] | |
overrides | Alpha |
optional , readonly |
{ minimumSequenceNumber?: number | undefined; } | undefined | |
pendingMessages | Alpha |
readonly |
IMockContainerRuntimePendingMessage[] | |
runtimeOptions | Alpha |
readonly |
Required<IMockContainerRuntimeOptions> | The runtime options this instance is using. See IMockContainerRuntimeOptions. |
Constructor Details
(constructor)
Constructs a new instance of the MockContainerRuntime
class
For more information about our API support guarantees, see here.
Signature
constructor(dataStoreRuntime: MockFluidDataStoreRuntime, factory: MockContainerRuntimeFactory, mockContainerRuntimeOptions?: IMockContainerRuntimeOptions, overrides?: {
minimumSequenceNumber?: number | undefined;
} | undefined);
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
dataStoreRuntime | MockFluidDataStoreRuntime | ||
factory | MockContainerRuntimeFactory | ||
mockContainerRuntimeOptions | optional | IMockContainerRuntimeOptions | |
overrides | optional | { minimumSequenceNumber?: number | undefined; } | undefined |
Property Details
clientId
For more information about our API support guarantees, see here.
Signature
clientId: string;
Type: string
dataStoreRuntime
For more information about our API support guarantees, see here.
Signature
protected readonly dataStoreRuntime: MockFluidDataStoreRuntime;
Type: MockFluidDataStoreRuntime
deltaConnections
use the associated datastore to create the delta connection
For more information about our API support guarantees, see here.
Signature
protected readonly deltaConnections: MockDeltaConnection[];
Type: MockDeltaConnection[]
deltaManager
For more information about our API support guarantees, see here.
Signature
readonly deltaManager: MockDeltaManager;
Type: MockDeltaManager
factory
For more information about our API support guarantees, see here.
Signature
protected readonly factory: MockContainerRuntimeFactory;
Type: MockContainerRuntimeFactory
isDirty
For more information about our API support guarantees, see here.
Signature
get isDirty(): boolean;
Type: boolean
outbox
For more information about our API support guarantees, see here.
Signature
protected readonly outbox: IInternalMockRuntimeMessage[];
Type: IInternalMockRuntimeMessage[]
overrides
For more information about our API support guarantees, see here.
Signature
protected readonly overrides?: {
minimumSequenceNumber?: number | undefined;
} | undefined;
Type: { minimumSequenceNumber?: number | undefined; } | undefined
pendingMessages
For more information about our API support guarantees, see here.
Signature
protected readonly pendingMessages: IMockContainerRuntimePendingMessage[];
Type: IMockContainerRuntimePendingMessage[]
runtimeOptions
The runtime options this instance is using. See IMockContainerRuntimeOptions.
For more information about our API support guarantees, see here.
Signature
protected readonly runtimeOptions: Required<IMockContainerRuntimeOptions>;
Type: Required<IMockContainerRuntimeOptions>