UNPKG

xrm-mock

Version:

A fake implementation of the Xrm object model. Used for testing Dynamics 365 client-side scripts.

12 lines (11 loc) 684 B
/// <reference types="xrm" /> export declare class PageMock implements Xrm.FormContext { context: Xrm.GlobalContext; data: Xrm.Data; ui: Xrm.Ui; constructor(context: Xrm.GlobalContext, formContext: Xrm.FormContext); getAttribute<T extends Xrm.Attributes.Attribute>(attributeNameOrIndex: number | string): T | null; getAttribute<T extends Xrm.Attributes.Attribute>(delegateFunction?: Xrm.Collection.MatchingDelegate<T>): T[]; getControl<T extends Xrm.Controls.Control>(controlNameOrIndex: string | number): T | null; getControl<T extends Xrm.Controls.Control>(delegateFunction?: Xrm.Collection.MatchingDelegate<Xrm.Controls.Control>): T[]; }