提交 383ab9c9 编写于 作者: Z zhijianwen

--ActsNotificationDistributedTest--

Signed-off-by: Nzhijianwen <zhijianwen@huawei.com>
上级 c4da1f91
......@@ -19,7 +19,12 @@ export default function ActsNotificationDistributedTest() {
describe('SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST', function () {
let TAG = 'SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST ===>'
console.info(TAG + 'SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST START')
/*
* @tc.number : SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100
* @tc.name : function isDistributedEnabled(callback: AsyncCallback<boolean>): void
* @tc.desc : Obtains whether the device supports distributed notification
*/
it('SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100 START`)
notification.isDistributedEnabled((err, data) => {
......@@ -29,18 +34,23 @@ export default function ActsNotificationDistributedTest() {
done()
} else {
console.info(`${TAG} isDistributedEnabled AsyncCallback success: ${data}`)
expect(data).assertTrue()
expect(data).assertFalse()
done()
}
})
console.info(`${TAG} SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100 END`)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0200
* @tc.name : function isDistributedEnabled(): Promise<boolean>
* @tc.desc : Obtains whether the device supports distributed notification
*/
it('SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0200', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0200 START`)
notification.isDistributedEnabled().then((data) => {
console.info(`${TAG} isDistributedEnabled Promise success: ${data}`)
expect(data).assertTrue()
expect(data).assertFalse()
done()
}).catch((err) => {
console.info(`${TAG} isDistributedEnabled Promise err: ${err.code}`)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册