From 341c41dd0db2f512aaa51154c2be65fa22ebe33a Mon Sep 17 00:00:00 2001 From: qinliwen Date: Wed, 12 Apr 2023 11:42:55 +0800 Subject: [PATCH] =?UTF-8?q?<=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=94=A8=E4=BE=8B>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qinliwen --- .../main/js/test/AudioEventManagement.test.js | 347 ------------------ 1 file changed, 347 deletions(-) diff --git a/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js b/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js index aff3aed03..6edd6c196 100644 --- a/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js +++ b/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js @@ -34,7 +34,6 @@ describe('audioEventManagement', function () { console.info(`${TagFrmwk}: getAudioManger : FAIL`); } } - function displayDeviceProp(value, index, array) { let devRoleName; let devTypeName; if (value.deviceRole == 1) { @@ -92,353 +91,7 @@ describe('audioEventManagement', function () { }) - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_0100 - *@tc.name : getDevices - Output device - Promise - ENAME - *@tc.desc : getDevices - Output device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_0100', 0, async function (done) { - const PROMISE = audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG) - PROMISE.then(function (value) { - - console.info(`${TagFrmwk}: Promise: getDevices OUTPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Promise: getDevices : OUTPUT_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Promise: getDevices : OUTPUT_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - }); - await PROMISE; - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_ENUM_0100 - *@tc.name : getDevices - Output device - Promise - ENUM - *@tc.desc : getDevices - Output device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_ENUM_0100', 0, async function (done) { - const PROMISE = audioManager.getDevices(1) - PROMISE.then(function (value) { - console.info(`${TagFrmwk}: Promise: getDevices OUTPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Promise: getDevices : OUTPUT_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Promise: getDevices : OUTPUT_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - }); - await PROMISE; - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INPUT_0100 - *@tc.name : getDevices - Input device - Promise - ENAME - *@tc.desc : getDevices - Input device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INPUT_0100', 0, async function (done) { - const PROMISE = audioManager.getDevices(audio.DeviceFlag.INPUT_DEVICES_FLAG); - PROMISE.then(function (value) { - console.info(`${TagFrmwk}: Promise: getDevices INPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Promise: getDevices : INPUT_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Promise: getDevices : INPUT_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - }); - await PROMISE; - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INTPUT_ENUM_0100 - *@tc.name : getDevices - Input device - Promise - ENUM - *@tc.desc : getDevices - Input device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INTPUT_ENUM_0100', 0, async function (done) { - const PROMISE = audioManager.getDevices(2); - PROMISE.then(function (value) { - console.info(`${TagFrmwk}: Promise: getDevices INPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Promise: getDevices : INPUT_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Promise: getDevices : INPUT_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - }); - await PROMISE; - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_0100 - *@tc.name : getDevices - ALL device - Promise - ENAME - *@tc.desc : getDevices - ALL device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_0100', 0, async function (done) { - const PROMISE = audioManager.getDevices(audio.DeviceFlag.ALL_DEVICES_FLAG); - PROMISE.then(function (value) { - console.info(`${TagFrmwk}: Promise: getDevices ALL_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Promise: getDevices : ALL_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Promise: getDevices : ALL_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - }); - await PROMISE; - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_ENUM_0100 - *@tc.name : getDevices - ALL device - Promise - ENUM - *@tc.desc : getDevices - ALL device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_ENUM_0100', 0, async function (done) { - const PROMISE = audioManager.getDevices(3); - PROMISE.then(function (value) { - console.info(`${TagFrmwk}: Promise: getDevices ALL_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Promise: getDevices : ALL_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Promise: getDevices : ALL_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - }); - await PROMISE; - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_0100 - *@tc.name : getDevices - Output device - Callback - ENAME - *@tc.desc : getDevices - Output device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_0100', 0, function (done) { - audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG, (err, value) => { - console.info(`${TagFrmwk}: Callback: getDevices OUTPUT_DEVICES_FLAG`); - if (err) { - console.error(`${TagFrmwk}: Callback: OUTPUT_DEVICES_FLAG: failed to get devices ${err.message}`); - expect().assertFail(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices OUTPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - } - done(); - }); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_ENUM_0100 - *@tc.name : getDevices - Output device - Callback - ENUM - *@tc.desc : getDevices - Output device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_ENUM_0100', 2, function (done) { - audioManager.getDevices(1, (err, value) => { - console.info(`${TagFrmwk}: Callback: getDevices OUTPUT_DEVICES_FLAG`); - if (err) { - console.error(`${TagFrmwk}: Callback: OUTPUT_DEVICES_FLAG: failed to get devices ${err.message}`); - expect().assertFail(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices OUTPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL`); - expect(false).assertTrue(); - } - } - done(); - }); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_0100 - *@tc.name : getDevices - Input device - Callback - ENAME - *@tc.desc : getDevices - Input device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_0100', 0, function (done) { - audioManager.getDevices(audio.DeviceFlag.INPUT_DEVICES_FLAG, (err, value) => { - console.info(`${TagFrmwk}: Callback: getDevices INPUT_DEVICES_FLAG`); - if (err) { - console.error(`${TagFrmwk}: Callback: INPUT_DEVICES_FLAG: failed to get devices ${err.message}`); - expect().assertFail(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices INPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Callback: getDevices : INPUT_DEVICES_FLAG: PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL`); - expect(false).assertTrue(); - } - } - done(); - }); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_ENUM_0100 - *@tc.name : getDevices - Input device - Callback - ENUM - *@tc.desc : getDevices - Input device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_ENUM_0100', 0, function (done) { - audioManager.getDevices(2, (err, value) => { - console.info(`${TagFrmwk}: Callback: getDevices INPUT_DEVICES_FLAG`); - if (err) { - console.error(`${TagFrmwk}: Callback: INPUT_DEVICES_FLAG: failed to get devices ${err.message}`); - expect().assertFail(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices INPUT_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Callback: getDevices : INPUT_DEVICES_FLAG: PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL`); - expect(false).assertTrue(); - } - } - done(); - }); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_0100 - *@tc.name : getDevices - ALL device - Callback - ENAME - *@tc.desc : getDevices - ALL device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_0100', 0, function (done) { - audioManager.getDevices(audio.DeviceFlag.ALL_DEVICES_FLAG, (err, value) => { - console.info(`${TagFrmwk}: Callback: getDevices ALL_DEVICES_FLAG`); - if (err) { - console.error(`${TagFrmwk}: Callback: ALL_DEVICES_FLAG: failed to get devices ${err.message}`); - expect().assertFail(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices ALL_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Callback: getDevices : ALL_DEVICES_FLAG: PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices : ALL_DEVICES_FLAG: FAIL`); - expect(false).assertTrue(); - } - } - done(); - }); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_ENUM_0100 - *@tc.name : getDevices - ALL device - Callback - ENUM - *@tc.desc : getDevices - ALL device - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_ENUM_0100', 2, function (done) { - audioManager.getDevices(3, (err, value) => { - console.info(`${TagFrmwk}: Callback: getDevices ALL_DEVICES_FLAG`); - if (err) { - console.error(`${TagFrmwk}: Callback: ALL_DEVICES_FLAG: failed to get devices ${err.message}`); - expect().assertFail(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices ALL_DEVICES_FLAG`); - value.forEach(displayDeviceProp); - if (deviceTypeValue != null && deviceRoleValue != null) { - console.info(`${TagFrmwk}: Callback: getDevices : ALL_DEVICES_FLAG: PASS`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Callback: getDevices : ALL_DEVICES_FLAG: FAIL`); - expect(false).assertTrue(); - } - } - done(); - }); - }) /** *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_DEVICECHANGETYPE_0100 -- GitLab