xrm-mock
Version:
A fake implementation of the Xrm object model. Used for testing Dynamics 365 client-side scripts.
26 lines (25 loc) • 786 B
TypeScript
/// <reference types="xrm" />
export declare class ControlMock implements Xrm.Controls.Control {
controlType: Xrm.Controls.ControlType;
name: string;
parent: Xrm.Controls.Section;
label: string;
visible: boolean;
constructor(components: IControlComponents);
getControlType(): Xrm.Controls.ControlType | string;
getName(): string;
getParent(): Xrm.Controls.Section;
getLabel(): string;
setLabel(label: string): void;
getVisible(): boolean;
}
export interface IControlComponents extends IAttControlComponents {
name: string;
}
export interface IAttControlComponents {
name?: string;
controlType?: Xrm.Controls.ControlType;
label?: string;
visible?: boolean;
parent?: Xrm.Controls.Section;
}