@testwizard/commands-remotecontrol
Version:
23 lines (16 loc) • 610 B
JavaScript
;
const Commands = require('@testwizard/commands-core');
const Result = require('./SendRCKeyResult');
class SendRCKeyCommand extends Commands.CommandBase {
constructor(testObject) {
super(testObject, 'SendRCKey');
}
async execute(keyName) {
if (keyName === undefined)
throw new Error('keyName is required');
const requestObj = [keyName];
const json = await this.executeCommand(requestObj);
return new Result(json, 'sendRCKey was successful', 'sendRCKey failed');
}
}
module.exports = SendRCKeyCommand;