@shko.online/componentframework-mock
Version:
Mocking library to help with testing PowerApps Component Framework Components
18 lines (17 loc) • 580 B
JavaScript
/*
Copyright (c) 2022 Betim Beja and Shko Online LLC
Licensed under the MIT license.
*/
import { MetadataMock } from './Metadata.mock';
import { OptionMetadataMock } from './OptionMetadata.mock';
export class TwoOptionMetadataMock extends MetadataMock {
constructor(defaultValue) {
super();
this.Options = void 0;
this.DefaultValue = void 0;
const FalseOption = new OptionMetadataMock(0, 'No');
const TrueOption = new OptionMetadataMock(1, 'Yes');
this.Options = [FalseOption, TrueOption];
this.DefaultValue = defaultValue || false;
}
}