提交 1c2f9f35 编写于 作者: Z zhijianwen

--ActsNotificationManagerSlotTest--

Signed-off-by: Nzhijianwen <zhijianwen@huawei.com>
上级 aa52e4d7
......@@ -22,9 +22,10 @@ export default function ActsNotificationManagerSlotTest() {
afterEach(async function (done) {
console.info(`${TAG} afterEach START`)
try {
await notificationManager.removeAllSlots((err) => {
if (err) {
console.info(`${TAG} removeAllSlots err: ${err}`)
console.info(`${TAG} removeAllSlots errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -33,6 +34,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeAllSlots errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(`${TAG} afterEach END`)
})
......@@ -43,9 +49,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0100', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0100 START')
try {
await notificationManager.addSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
if (err) {
console.info(`${TAG} addSlot_1 AsyncCallback err: ${err}`)
console.info(`${TAG} addSlot_1 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -54,6 +61,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} addSlot_1 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0100 END')
})
......@@ -64,9 +76,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0200', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0200 START')
try {
await notificationManager.addSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err) {
console.info(`${TAG} addSlot_2 AsyncCallback err: ${err}`)
console.info(`${TAG} addSlot_2 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -75,6 +88,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} addSlot_2 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0200 END')
})
......@@ -85,9 +103,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0300', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0300 START')
try {
await notificationManager.addSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} addSlot_3 AsyncCallback err: ${err}`)
console.info(`${TAG} addSlot_3 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -96,6 +115,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} addSlot_3 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0300 END')
})
......@@ -106,9 +130,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0400', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0400 START')
try {
await notificationManager.addSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} addSlot_4 AsyncCallback err: ${err}`)
console.info(`${TAG} addSlot_4 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -117,6 +142,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} addSlot_4 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0400 END')
})
......@@ -127,9 +157,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0500', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0500 START')
try {
await notificationManager.addSlot(notificationManager.SlotType.OTHER_TYPES, (err) => {
if (err) {
console.info(`${TAG} addSlot_5 AsyncCallback err: ${err}`)
console.info(`${TAG} addSlot_5 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -138,6 +169,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} addSlot_5 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0500 END')
})
......@@ -153,7 +189,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} addSlot_6 Promise err: ${err}`)
console.info(`${TAG} addSlot_6 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -172,7 +208,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} addSlot_7 Promise err: ${err}`)
console.info(`${TAG} addSlot_7 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -191,7 +227,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} addSlot_8 Promise err: ${err}`)
console.info(`${TAG} addSlot_8 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -210,7 +246,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} addSlot_9 Promise err: ${err}`)
console.info(`${TAG} addSlot_9 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -229,7 +265,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} addSlot_10 Promise err: ${err}`)
console.info(`${TAG} addSlot_10 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -243,9 +279,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1100', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1100 START')
try {
await notificationManager.getSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot_1 AsyncCallback err: ${err}`)
console.info(`${TAG} getSlot_1 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -254,6 +291,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot_1 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1100 END')
})
......@@ -264,9 +306,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1200', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1200 START')
try {
await notificationManager.getSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot_2 AsyncCallback err: ${err}`)
console.info(`${TAG} getSlot_2 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -275,6 +318,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot_2 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1200 END')
})
......@@ -285,9 +333,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1300', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1300 START')
try {
await notificationManager.getSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot_3 AsyncCallback err: ${err}`)
console.info(`${TAG} getSlot_3 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -296,6 +345,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot_3 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1300 END')
})
......@@ -306,9 +360,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1400', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1400 START')
try {
await notificationManager.getSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot_4 AsyncCallback err: ${err}`)
console.info(`${TAG} getSlot_4 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -317,6 +372,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot_4 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1400 END')
})
......@@ -327,9 +387,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1500', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1500 START')
try {
await notificationManager.getSlot(notificationManager.SlotType.OTHER_TYPES, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot_5 AsyncCallback err: ${err}`)
console.info(`${TAG} getSlot_5 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -338,6 +399,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot_5 AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1500 END')
})
......@@ -353,7 +419,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot_6 Promise err: ${err}`)
console.info(`${TAG} getSlot_6 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -372,7 +438,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot_7 Promise err: ${err}`)
console.info(`${TAG} getSlot_7 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -391,7 +457,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot_8 Promise err: ${err}`)
console.info(`${TAG} getSlot_8 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -410,7 +476,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot_9 Promise err: ${err}`)
console.info(`${TAG} getSlot_9 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -429,7 +495,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot_10 Promise err: ${err}`)
console.info(`${TAG} getSlot_10 Promise errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -443,9 +509,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2100', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2100 START')
try {
await notificationManager.removeSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
if (err) {
console.info(`${TAG} removeSlot_1 err: ${err}`)
console.info(`${TAG} removeSlot_1 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -454,6 +521,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot_1 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2100 END')
})
......@@ -464,9 +536,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2200', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2200 START')
try {
await notificationManager.removeSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err) {
console.info(`${TAG} removeSlot_2 err: ${err}`)
console.info(`${TAG} removeSlot_2 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -475,6 +548,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot_2 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2200 END')
})
......@@ -485,9 +563,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2300', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2300 START')
try {
await notificationManager.removeSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} removeSlot_3 err: ${err}`)
console.info(`${TAG} removeSlot_3 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -496,6 +575,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot_3 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2300 END')
})
......@@ -506,9 +590,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2400', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2400 START')
try {
await notificationManager.removeSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} removeSlot_4 err: ${err}`)
console.info(`${TAG} removeSlot_4 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -517,6 +602,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot_4 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2400 END')
})
......@@ -527,9 +617,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2500', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2500 START')
try {
await notificationManager.removeSlot(notificationManager.SlotType.OTHER_TYPES, (err) => {
if (err) {
console.info(`${TAG} removeSlot_5 err: ${err}`)
console.info(`${TAG} removeSlot_5 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -538,6 +629,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot_5 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2500 END')
})
......@@ -553,7 +649,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot_6 err: ${err}`)
console.info(`${TAG} removeSlot_6 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -572,7 +668,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot_7 err: ${err}`)
console.info(`${TAG} removeSlot_7 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -591,7 +687,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot_8 err: ${err}`)
console.info(`${TAG} removeSlot_8 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -610,7 +706,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot_9 err: ${err}`)
console.info(`${TAG} removeSlot_9 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -629,7 +725,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(false).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot_10 err: ${err}`)
console.info(`${TAG} removeSlot_10 errCode: ${err.code}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
})
......@@ -649,14 +745,15 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_11 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_11 err: ${err}`)
console.info(`${TAG} addSlot_11 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
try {
await notificationManager.getSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot UNKNOWN_TYPE err: ${err}`)
console.info(`${TAG} getSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -665,10 +762,16 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
if (err) {
console.info(`${TAG} removeSlot UNKNOWN_TYPE err: ${err}`)
console.info(`${TAG} removeSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -677,6 +780,12 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3100 END')
})
......@@ -693,14 +802,15 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_12 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_12 err: ${err}`)
console.info(`${TAG} addSlot_12 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
try {
await notificationManager.getSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION err: ${err}`)
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -709,10 +819,16 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err) {
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION err: ${err}`)
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -721,6 +837,12 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3200 END')
})
......@@ -737,14 +859,15 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_13 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_13 err: ${err}`)
console.info(`${TAG} addSlot_13 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
try {
await notificationManager.getSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot SERVICE_INFORMATION err: ${err}`)
console.info(`${TAG} getSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -753,10 +876,16 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} removeSlot SERVICE_INFORMATION err: ${err}`)
console.info(`${TAG} removeSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -765,6 +894,12 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3300 END')
})
......@@ -781,14 +916,15 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_14 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_14 err: ${err}`)
console.info(`${TAG} addSlot_14 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
try {
await notificationManager.getSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot CONTENT_INFORMATION err: ${err}`)
console.info(`${TAG} getSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -797,10 +933,16 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err}`)
console.info(`${TAG} removeSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -809,6 +951,12 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3400 END')
})
......@@ -825,14 +973,15 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_15 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_15 err: ${err}`)
console.info(`${TAG} addSlot_15 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
try {
await notificationManager.getSlot(notificationManager.SlotType.OTHER_TYPES, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot OTHER_TYPES err: ${err}`)
console.info(`${TAG} getSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -841,18 +990,30 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.OTHER_TYPES, (err) => {
if (err) {
console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err}`)
console.info(`${TAG} removeSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
console.info(`${TAG} removeSlot CONTENT_INFORMATION success`)
console.info(`${TAG} removeSlot OTHER_TYPES success`)
expect(true).assertTrue()
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3500 END')
})
......@@ -869,7 +1030,7 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_16 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_16 err: ${err}`)
console.info(`${TAG} addSlot_16 errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -879,7 +1040,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot UNKNOWN_TYPE err: ${err}`)
console.info(`${TAG} getSlot UNKNOWN_TYPE err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -889,7 +1050,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot UNKNOWN_TYPE err: ${err}`)
console.info(`${TAG} removeSlot UNKNOWN_TYPE err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -909,7 +1070,7 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_17 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_17 err: ${err}`)
console.info(`${TAG} addSlot_17 err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -919,7 +1080,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION err: ${err}`)
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -929,7 +1090,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION err: ${err}`)
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -949,7 +1110,7 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_18 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_18 err: ${err}`)
console.info(`${TAG} addSlot_18 err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -959,7 +1120,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot SERVICE_INFORMATION err: ${err}`)
console.info(`${TAG} getSlot SERVICE_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -969,7 +1130,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot SERVICE_INFORMATION err: ${err}`)
console.info(`${TAG} removeSlot SERVICE_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -989,7 +1150,7 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_19 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_19 err: ${err}`)
console.info(`${TAG} addSlot_19 err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -999,7 +1160,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot CONTENT_INFORMATION err: ${err}`)
console.info(`${TAG} getSlot CONTENT_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -1009,7 +1170,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err}`)
console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -1029,7 +1190,7 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_20 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_20 err: ${err}`)
console.info(`${TAG} addSlot_20 err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -1039,7 +1200,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlot OTHER_TYPES err: ${err}`)
console.info(`${TAG} getSlot OTHER_TYPES err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -1049,7 +1210,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeSlot OTHER_TYPES err: ${err}`)
console.info(`${TAG} removeSlot OTHER_TYPES err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -1068,14 +1229,15 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_21 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_21 err: ${err}`)
console.info(`${TAG} addSlot_21 err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
try {
await notificationManager.getSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlot_21 err: ${err}`)
console.info(`${TAG} getSlot_21 err: ${err}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
......@@ -1084,6 +1246,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlot_21 errCode: ${err}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4100 END')
})
......@@ -1099,22 +1266,28 @@ export default function ActsNotificationManagerSlotTest() {
console.info(`${TAG} addSlot_22 success`)
expect(true).assertTrue()
}).catch((err) => {
console.info(`${TAG} addSlot_22 err: ${err}`)
console.info(`${TAG} addSlot_22 err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
try {
await notificationManager.removeSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} getSlot_22 err: ${err}`)
console.info(`${TAG} removeSlot err: ${err}, errMes: ${err.message}`)
expect(true).assertTrue()
done()
} else {
console.info(`${TAG} getSlot_22 success`)
console.info(`${TAG} removeSlot success`)
expect(false).assertTrue()
done()
}
})
} catch (err) {
console.info(`${TAG} removeSlot errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4200 END')
})
......@@ -1125,9 +1298,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4300', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4300 START')
try {
await notificationManager.removeAllSlots((err) => {
if (err) {
console.info(`${TAG} removeAllSlots AsyncCallback err: ${err}`)
console.info(`${TAG} removeAllSlots AsyncCallback err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1136,6 +1310,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} removeAllSlots errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4300 END')
})
......@@ -1151,7 +1330,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} removeAllSlots Promise err: ${err}`)
console.info(`${TAG} removeAllSlots Promise err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -1165,9 +1344,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4500', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4500 START')
try {
await notificationManager.getSlots((err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlots AsyncCallback err: ${err}`)
console.info(`${TAG} getSlots AsyncCallback err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1176,6 +1356,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlots errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4500 END')
})
......@@ -1191,7 +1376,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
done()
}).catch((err) => {
console.info(`${TAG} getSlots Promise err: ${err}`)
console.info(`${TAG} getSlots Promise err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......@@ -1206,21 +1391,10 @@ export default function ActsNotificationManagerSlotTest() {
*/
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4700', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4700 START')
// await notificationManager.addSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
// if (err) {
// console.info(`${TAG} addSlot UNKNOWN_TYPE err: + ${err}`)
// expect(false).assertTrue()
// done()
// } else {
// console.info(`${TAG} addSlot UNKNOWN_TYPE success`)
// expect(true).assertTrue()
// }
// })
try {
await notificationManager.addSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err) {
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: + ${err}`)
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1228,10 +1402,16 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.addSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} addSlot SERVICE_INFORMATION err: + ${err}`)
console.info(`${TAG} addSlot SERVICE_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1239,10 +1419,16 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot SERVICE_INFORMATION errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.addSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} addSlot CONTENT_INFORMATION err: + ${err}`)
console.info(`${TAG} addSlot CONTENT_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1250,10 +1436,16 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot CONTENT_INFORMATION errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.addSlot(notificationManager.SlotType.OTHER_TYPES, (err) => {
if (err) {
console.info(`${TAG} addSlot OTHER_TYPES err: + ${err}`)
console.info(`${TAG} addSlot OTHER_TYPES err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1261,10 +1453,16 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot OTHER_TYPES errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.getSlots((err, NotificationSlot) => {
if (err) {
console.info(`${TAG} getSlots AsyncCallback err: + ${err}`)
console.info(`${TAG} getSlots AsyncCallback err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1276,6 +1474,11 @@ export default function ActsNotificationManagerSlotTest() {
done()
}
})
} catch (err) {
console.info(`${TAG} getSlots AsyncCallback errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4700 END')
})
......@@ -1288,20 +1491,10 @@ export default function ActsNotificationManagerSlotTest() {
it('SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4800', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4800 START')
// await notificationManager.addSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
// if (err) {
// console.info(`${TAG} addSlot UNKNOWN_TYPE err: + ${err}`)
// expect(false).assertTrue()
// done()
// } else {
// console.info(`${TAG} addSlot UNKNOWN_TYPE success`)
// expect(true).assertTrue()
// }
// })
try {
await notificationManager.addSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err) {
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: + ${err}`)
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1309,10 +1502,16 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.addSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} addSlot SERVICE_INFORMATION err: + ${err}`)
console.info(`${TAG} addSlot SERVICE_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1320,10 +1519,16 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot SERVICE_INFORMATION errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.addSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err) => {
if (err) {
console.info(`${TAG} addSlot CONTENT_INFORMATION err: + ${err}`)
console.info(`${TAG} addSlot CONTENT_INFORMATION err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1331,10 +1536,16 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot CONTENT_INFORMATION errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.addSlot(notificationManager.SlotType.OTHER_TYPES, (err) => {
if (err) {
console.info(`${TAG} addSlot OTHER_TYPES err: + ${err}`)
console.info(`${TAG} addSlot OTHER_TYPES err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
......@@ -1342,6 +1553,11 @@ export default function ActsNotificationManagerSlotTest() {
expect(true).assertTrue()
}
})
} catch (err) {
console.info(`${TAG} addSlot OTHER_TYPES errCode: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
await notificationManager.getSlots().then((NotificationSlot) => {
console.info(`${TAG} getSlots Promise success:` + JSON.stringify(NotificationSlot))
......@@ -1351,7 +1567,7 @@ export default function ActsNotificationManagerSlotTest() {
expect(NotificationSlot[3].type).assertEqual(65535)
done()
}).catch((err) => {
console.info(`${TAG} getSlots Promise err: + ${err}`)
console.info(`${TAG} getSlots Promise err: ${err}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册