xrm-mock
Version:
A fake implementation of the Xrm object model. Used for testing Dynamics 365 client-side scripts.
20 lines (19 loc) • 1.21 kB
TypeScript
/// <reference types="xrm" />
import { OptionSetAttributeMock } from "../../attributes/optionsetattribute/optionsetattribute.mock";
import { OptionSetValueMock } from "../../optionsetvalue/optionsetvalue.mock";
import { IAttStandardControlComponents, IStandardControlComponents, StandardControlMock } from "../standardcontrol/standardcontrol.mock";
export declare class OptionSetControlMock extends StandardControlMock<OptionSetControlMock, OptionSetAttributeMock, number> implements Xrm.Controls.OptionSetControl {
private static defaultComponents;
options: OptionSetValueMock[];
constructor(components: IOptionSetControlComponents);
addOption(option: Xrm.OptionSetValue, index?: number): void;
clearOptions(): void;
removeOption(value: number): void;
getOptions(): Xrm.OptionSetValue[];
}
export interface IOptionSetControlComponents extends IStandardControlComponents<OptionSetControlMock, OptionSetAttributeMock, number>, IAttOptionSetControlComponents {
name: string;
}
export interface IAttOptionSetControlComponents extends IAttStandardControlComponents<OptionSetControlMock, OptionSetAttributeMock, number> {
options?: Xrm.OptionSetValue[];
}