未验证 提交 2e3a7ee5 编写于 作者: O openharmony_ci 提交者: Gitee

!8336 新增removeStickyCommonEvent用例

Merge pull request !8336 from FangJinliang/pr_0225
......@@ -70,4 +70,48 @@ describe('SUB_NOTIFICATION_CES_SYSTEM_API_TEST', function () {
console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0200 END`);
});
/*
* @tc.number: SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300
* @tc.name: removeStickyCommonEvent
* @tc.desc: test function removeStickyCommonEvent
*/
it('SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300 START`);
commonEventManager.removeStickyCommonEvent("sticky_event", (err) => {
if (err) {
console.info(`${TAG} remove sticky event AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(err.code).assertEqual(202);
done()
} else {
console.info("${TAG} remove sticky event AsyncCallback success");
expect(false).assertTrue()
done()
}
});
console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300 END`);
});
/*
* @tc.number: SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400
* @tc.name: removeStickyCommonEvent
* @tc.desc: test function removeStickyCommonEvent
*/
it('SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400 START`);
commonEventManager.removeStickyCommonEvent("sticky_event").then(() => {
console.info("${TAG} remove sticky event AsyncCallback success");
expect(false).assertTrue()
done()
}).catch ((err) => {
console.info(`${TAG} remove sticky event AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(err.code).assertEqual(202);
done()
});
console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400 END`);
});
}) }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册