import { Diagnostic } from '@eclipse-emfcloud/model-validation';
import { Container, interfaces } from '@theia/core/shared/inversify';
import { Operation } from 'fast-json-patch';
import { ModelHubClient, ModelHubProtocol, ModelServiceSubscriptionToken } from '../../common';
import { FrontendModelHubSubscriber } from '../frontend-model-hub-subscriber';
/**
 * All that we need for testing are the subscription-related methods and `getModel()`.
 */
export declare class FakeModelHubProtocol<K = string> implements Partial<ModelHubProtocol<K>> {
    protected nextSubId: number;
    protected readonly subscriptions: Map<number, ModelServiceSubscriptionToken<K>>;
    protected readonly models: Map<K, object>;
    protected client: ModelHubClient<K> | undefined;
    protected readonly pendingSubs: Promise<ModelServiceSubscriptionToken<K>>[];
    subscribe(context: string, ...modelIds: K[]): Promise<ModelServiceSubscriptionToken<K>>;
    closeSubscription(tokenOrId: ModelServiceSubscriptionToken<K> | number): Promise<void>;
    setModel(modelId: K, model: object): void;
    removeModel(modelId: K): void;
    getModel<M extends object, C = unknown>(_context: C, modelId: K): Promise<M>;
    fakeModelChange(modelId: K, patch: Operation[]): void;
    fakeModelDirtyState(modelId: K, dirty: boolean): void;
    fakeModelValidated(modelId: K, diagnostic: Diagnostic): void;
    fakeModelLoaded(modelId: K): void;
    fakeModelUnloaded(modelId: K): void;
    fakeModelHubDisposed(): void;
    fakeModelHubCreated(context: string): void;
    fakeModelHubDestroyed(context: string): void;
    fakeSubscriptionClosed(modelId: K): void;
    setClient(client: ModelHubClient<K>): void;
    get pendingSubsReady(): Promise<void>;
    protected lookupSubs(modelId?: K): ModelServiceSubscriptionToken<K>[];
}
export declare function bindFakeModelHubProtocol(binder: interfaces.Bind | Container): void;
export declare function connectClient(modelHub: FakeModelHubProtocol, subscriber: FrontendModelHubSubscriber): void;
//# sourceMappingURL=fake-model-hub-protocol.d.ts.map