@testwizard/commands-video
Version:
27 lines (20 loc) • 948 B
JavaScript
;
const Commands = require('@testwizard/commands-core');
const Result = Commands.ResultForOkAndErrorCode;
class FilterContrastBrightnessIntensityCommand extends Commands.CommandBase {
constructor(testObject) {
super(testObject, 'FilterCBI');
}
async execute(contrast, brightness, intensity) {
if (contrast === undefined)
throw new Error('contrast is required');
if (brightness === undefined)
throw new Error('brightness is required');
if (intensity === undefined)
throw new Error('intensity is required');
const requestObj = [contrast, brightness, intensity];
const json = await this.executeCommand(requestObj);
return new Result(json, 'filterContrastBrightnessIntensity was successful', 'filterContrastBrightnessIntensity failed');
}
}
module.exports = FilterContrastBrightnessIntensityCommand;