提交 9f1d9ce4 编写于 作者: Q qinliwen

<删除冗余无效用例>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 799a1637
...@@ -440,271 +440,6 @@ describe('audioEventManagement', function () { ...@@ -440,271 +440,6 @@ describe('audioEventManagement', function () {
}); });
}) })
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Promise
*@tc.desc : Deactivate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_0100', 2, async function (done) {
await audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, false).then(function () {
// Setting device active ENUM 2 = SPEAKER
console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Deactivate`);
audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER).then(function (value) {
if (value == false) {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`);
expect(false).assertTrue();
}
});
}).catch((err) => {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : Error : ${err.message}`);
expect(false).assertTrue();
});
done();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Promise - ENUM
*@tc.desc : Deactivate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_ENUM_0100', 2, async function (done) {
await audioManager.setDeviceActive(2, true).then(function () {
console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Active`);
});
await audioManager.setDeviceActive(2, false).then(function () {
// Setting device active ENUM 2 = SPEAKER
console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Deactivate`);
audioManager.isDeviceActive(2).then(function (value) {
if (value == false) {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`);
expect(false).assertTrue();
}
});
}).catch((err) => {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : Error : ${err.message}`);
expect(false).assertTrue();
});
done();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - Activate - Promise
*@tc.desc : Activate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_0100', 2, async function (done) {
await audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, true).then(function () {
console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Activate`);
audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER).then(function (value) {
if (value == true) {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL : ${value}`);
expect(false).assertTrue();
}
});
}).catch((err) => {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :Error : ${err.message}`);
expect(false).assertTrue();
});
done();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - Activate - Promise - ENUM
*@tc.desc : Activate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_ENUM_0100', 2, async function (done) {
await audioManager.setDeviceActive(2, true).then(function () {
console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Activate`);
audioManager.isDeviceActive(2).then(function (value) {
if (value == true) {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL : ${value}`);
expect(false).assertTrue();
}
});
}).catch((err) => {
console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :Error : ${err.message}`);
expect(false).assertTrue();
});
done();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Callback
*@tc.desc : Deactivate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_0100', 2, function (done) {
audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, false, (err) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`);
expect(false).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`);
audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER, (err, value) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`);
expect(false).assertTrue();
}
else if (value == false) {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`);
expect(false).assertTrue();
}
done();
});
}
done();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Callback - ENUM
*@tc.desc : Deactivate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_ENUM_0100', 2, async function (done) {
await audioManager.setDeviceActive(2, true).then(function () {
console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER : Active`);
});
audioManager.setDeviceActive(2, false, (err) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`);
expect(false).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`);
audioManager.isDeviceActive(2, (err, value) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`);
expect(false).assertTrue();
}
else if (value == false) {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`);
expect(false).assertTrue();
}
done();
});
}
done();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - activate - Callback
*@tc.desc : Activate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_0100', 2, function (done) {
audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, true, (err) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active: Error: ${err.message}`);
expect(false).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`);
audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER, (err, value) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active: Error: ${err.message}`);
expect(false).assertTrue();
}
else if (value == true) {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : FAIL : ${value}`);
expect(false).assertTrue();
}
done();
});
}
done();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - activate - Callback - ENUM
*@tc.desc : Activate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_ENUM_0100 ', 2, function (done) {
audioManager.setDeviceActive(2, true, (err) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active: Error: ${err.message}`);
expect(false).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`);
audioManager.isDeviceActive(2, (err, value) => {
if (err) {
console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active: Error: ${err.message}`);
expect(false).assertTrue();
}
else if (value == true) {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : PASS : ${value}`);
expect(true).assertTrue();
}
else {
console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : FAIL : ${value}`);
expect(false).assertTrue();
}
done();
});
}
done();
});
})
/** /**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_DEVICECHANGETYPE_0100 *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_DEVICECHANGETYPE_0100
*@tc.name : DeviceChangeType - CONNECT *@tc.name : DeviceChangeType - CONNECT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册