MockFluidDataStoreRuntime Class
Mock implementation of IRuntime for testing that does nothing
To use, import via @fluidframework/test-runtime-utils/legacy.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export declare class MockFluidDataStoreRuntime extends EventEmitter implements IFluidDataStoreRuntime, IFluidDataStoreChannel, IFluidHandleContext
Extends: EventEmitter
Implements: IFluidDataStoreRuntime, IFluidDataStoreChannel, IFluidHandleContext
Constructors
| Constructor | Alerts | Description |
|---|---|---|
| (constructor)(overrides) | Beta | Constructs a new instance of the MockFluidDataStoreRuntime class |
Properties
Methods
Constructor Details
(constructor)
Constructs a new instance of the MockFluidDataStoreRuntime class
For more information about our API support guarantees, see here.
Signature
constructor(overrides?: {
clientId?: string;
entryPoint?: IFluidHandle<FluidObject>;
id?: string;
logger?: ITelemetryBaseLogger;
idCompressor?: IIdCompressor & IIdCompressorCore;
attachState?: AttachState;
registry?: readonly IChannelFactory[];
minVersionForCollab?: MinimumVersionForCollab;
});
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| overrides | optional | { clientId?: string; entryPoint?: IFluidHandle<FluidObject>; id?: string; logger?: ITelemetryBaseLogger; idCompressor?: IIdCompressor & IIdCompressorCore; attachState?: AttachState; registry?: readonly IChannelFactory[]; minVersionForCollab?: MinimumVersionForCollab; } |
Property Details
absolutePath
For more information about our API support guarantees, see here.
Signature
get absolutePath(): string;
Type: string
attachState
For more information about our API support guarantees, see here.
Signature
get attachState(): AttachState;
Type: AttachState
channelsRoutingContext
For more information about our API support guarantees, see here.
Signature
get channelsRoutingContext(): IFluidHandleContext;
Type: IFluidHandleContext
clientId
For more information about our API support guarantees, see here.
Signature
clientId: string;
Type: string
connected
For more information about our API support guarantees, see here.
Signature
readonly connected = true;
containerRuntime
For more information about our API support guarantees, see here.
Signature
containerRuntime?: MockContainerRuntime;
Type: MockContainerRuntime
deltaManager
For more information about our API support guarantees, see here.
Signature
get deltaManager(): IDeltaManagerErased;
Type: IDeltaManagerErased
deltaManagerInternal
For more information about our API support guarantees, see here.
Signature
deltaManagerInternal: MockDeltaManager;
Type: MockDeltaManager
disposed
For more information about our API support guarantees, see here.
Signature
get disposed(): boolean;
Type: boolean
documentId
For more information about our API support guarantees, see here.
Signature
readonly documentId: string;
Type: string
entryPoint
For more information about our API support guarantees, see here.
Signature
readonly entryPoint: IFluidHandleInternal<FluidObject>;
Type: IFluidHandleInternal<FluidObject>
existing
For more information about our API support guarantees, see here.
Signature
readonly existing: boolean;
Type: boolean
id
For more information about our API support guarantees, see here.
Signature
readonly id: string;
Type: string
idCompressor
For more information about our API support guarantees, see here.
Signature
idCompressor: (IIdCompressor & IIdCompressorCore) | undefined;
Type: (IIdCompressor & IIdCompressorCore) | undefined
IFluidHandleContext
For more information about our API support guarantees, see here.
Signature
get IFluidHandleContext(): IFluidHandleContext;
Type: IFluidHandleContext
ILayerCompatDetails
For more information about our API support guarantees, see here.
Signature
ILayerCompatDetails?: unknown;
Type: unknown
Remarks
This is for internal use only.
isAttached
For more information about our API support guarantees, see here.
Signature
get isAttached(): boolean;
Type: boolean
isReadOnly
For more information about our API support guarantees, see here.
Signature
readonly isReadOnly: () => boolean;
Type: () => boolean
loader
For more information about our API support guarantees, see here.
Signature
readonly loader: ILoader;
Type: ILoader
local
Use attachState instead
For more information about our API support guarantees, see here.
Signature
get local(): boolean;
set local(local: boolean);
Type: boolean
logger
For more information about our API support guarantees, see here.
Signature
readonly logger: ITelemetryBaseLogger;
Type: ITelemetryBaseLogger
minVersionForCollab
For more information about our API support guarantees, see here.
Signature
readonly minVersionForCollab: MinimumVersionForCollab | undefined;
Type: MinimumVersionForCollab | undefined
See Also
IFluidDataStoreRuntimeInternalConfig.minVersionForCollab
objectsRoutingContext
For more information about our API support guarantees, see here.
Signature
get objectsRoutingContext(): IFluidHandleContext;
Type: IFluidHandleContext
options
For more information about our API support guarantees, see here.
Signature
options: Record<string | number, any>;
Type: Record<string | number, any>
path
For more information about our API support guarantees, see here.
Signature
readonly path = "";
quorum
For more information about our API support guarantees, see here.
Signature
quorum: MockQuorumClients;
Type: MockQuorumClients
rootRoutingContext
For more information about our API support guarantees, see here.
Signature
get rootRoutingContext(): IFluidHandleContext;
Type: IFluidHandleContext
submitSignal
For more information about our API support guarantees, see here.
Signature
submitSignal: IFluidDataStoreRuntime["submitSignal"];
Type: IFluidDataStoreRuntime["submitSignal"]
visibilityState
For more information about our API support guarantees, see here.
Signature
get visibilityState(): VisibilityState;
Type: VisibilityState
Method Details
addChannel
For more information about our API support guarantees, see here.
Signature
addChannel(channel: IChannel): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| channel | IChannel |
applyStashedOp
For more information about our API support guarantees, see here.
Signature
applyStashedOp(content: any): Promise<unknown>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| content | any |
Returns
Return type: Promise<unknown>
attachGraph
For more information about our API support guarantees, see here.
Signature
attachGraph(): void;
bind
For more information about our API support guarantees, see here.
Signature
bind(handle: IFluidHandle): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| handle | IFluidHandle |
bindChannel
For more information about our API support guarantees, see here.
Signature
bindChannel(channel: IChannel): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| channel | IChannel |
close
For more information about our API support guarantees, see here.
Signature
close(): Promise<void>;
Returns
Return type: Promise<void>
createChannel
For more information about our API support guarantees, see here.
Signature
createChannel(id: string | undefined, type: string): IChannel;
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | undefined | |
| type | string |
Returns
Return type: IChannel
createDeltaConnection
For more information about our API support guarantees, see here.
Signature
createDeltaConnection(): MockDeltaConnection;
Returns
Return type: MockDeltaConnection
dispose
For more information about our API support guarantees, see here.
Signature
dispose(): void;
getAttachGCData
For more information about our API support guarantees, see here.
Signature
getAttachGCData(telemetryContext?: ITelemetryContext | undefined): IGarbageCollectionData;
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| telemetryContext | optional | ITelemetryContext | undefined |
Returns
Return type: IGarbageCollectionData
getAttachSnapshot
For more information about our API support guarantees, see here.
Signature
getAttachSnapshot(): ITreeEntry[];
Returns
Return type: ITreeEntry[]
getAttachSummary
For more information about our API support guarantees, see here.
Signature
getAttachSummary(): ISummaryTreeWithStats;
Returns
Return type: ISummaryTreeWithStats
getAudience
For more information about our API support guarantees, see here.
Signature
getAudience(): IAudience;
Returns
Return type: IAudience
getBlob
For more information about our API support guarantees, see here.
Signature
getBlob(blobId: string): Promise<any>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| blobId | string |
Returns
Return type: Promise<any>
getChannel
For more information about our API support guarantees, see here.
Signature
getChannel(id: string): Promise<IChannel>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string |
Returns
Return type: Promise<IChannel>
getGCData
For more information about our API support guarantees, see here.
Signature
getGCData(): Promise<IGarbageCollectionData>;
Returns
Return type: Promise<IGarbageCollectionData>
getQuorum
For more information about our API support guarantees, see here.
Signature
getQuorum(): IQuorumClients;
Returns
Return type: IQuorumClients
makeVisibleAndAttachGraph
For more information about our API support guarantees, see here.
Signature
makeVisibleAndAttachGraph(): void;
notifyReadOnlyState
For more information about our API support guarantees, see here.
Signature
notifyReadOnlyState(readonly: boolean): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| readonly | boolean |
processMessages
For more information about our API support guarantees, see here.
Signature
processMessages(messageCollection: IRuntimeMessageCollection): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| messageCollection | IRuntimeMessageCollection |
processSignal
For more information about our API support guarantees, see here.
Signature
processSignal(message: any, local: boolean): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| message | any | |
| local | boolean |
request
For more information about our API support guarantees, see here.
Signature
request(request: IRequest): Promise<IResponse>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| request | IRequest |
Returns
Return type: Promise<IResponse>
requestDataStore
For more information about our API support guarantees, see here.
Signature
requestDataStore(request: IRequest): Promise<IResponse>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| request | IRequest |
Returns
Return type: Promise<IResponse>
resolveHandle
For more information about our API support guarantees, see here.
Signature
resolveHandle(request: IRequest): Promise<IResponse>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| request | IRequest |
Returns
Return type: Promise<IResponse>
reSubmit
For more information about our API support guarantees, see here.
Signature
reSubmit(content: any, localOpMetadata: unknown, squash: boolean): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| content | any | |
| localOpMetadata | unknown | |
| squash | 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 |
save
For more information about our API support guarantees, see here.
Signature
save(message: string): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| message | string |
setAttachState
For more information about our API support guarantees, see here.
Signature
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| attachState | AttachState.Attaching | AttachState.Attached |
setConnectionState
For more information about our API support guarantees, see here.
Signature
setConnectionState(connected: boolean, clientId?: string): void;
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| connected | boolean | ||
| clientId | optional | string |
summarize
For more information about our API support guarantees, see here.
Signature
summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| fullTree | optional | boolean | |
| trackState | optional | boolean |
Returns
Return type: Promise<ISummaryTreeWithStats>
updateMinSequenceNumber
For more information about our API support guarantees, see here.
Signature
updateMinSequenceNumber(value: number): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| value | number |
updateUsedRoutes
For more information about our API support guarantees, see here.
Signature
updateUsedRoutes(usedRoutes: string[]): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| usedRoutes | string[] |
uploadBlob
For more information about our API support guarantees, see here.
Signature
uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| blob | ArrayBufferLike |
Returns
Return type: Promise<IFluidHandle<ArrayBufferLike>>
waitAttached
For more information about our API support guarantees, see here.
Signature
waitAttached(): Promise<void>;
Returns
Return type: Promise<void>