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

!5106 通知删除接口变更

Merge pull request !5106 from zero-cyc/0823
...@@ -29,7 +29,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -29,7 +29,7 @@ describe('ActsAnsNotificationRemove', function () {
console.info("=============ANS_Remove_0100 onConsume data:==================>" + JSON.stringify(data)); console.info("=============ANS_Remove_0100 onConsume data:==================>" + JSON.stringify(data));
console.info("=============ANS_Remove_0100 onConsume hascode:===============>" + data.request.hashCode); console.info("=============ANS_Remove_0100 onConsume hascode:===============>" + data.request.hashCode);
hashCode = data.request.hashCode hashCode = data.request.hashCode
notify.remove(hashCode,removeCallBack); notify.remove(hashCode, notify.RemoveReason.CANCEL_REASON_REMOVE, removeCallBack);
console.info("=============ANS_Remove_0100 onConsume remove=======================>"); console.info("=============ANS_Remove_0100 onConsume remove=======================>");
console.info("=============ANS_Remove_0100 onConsume end=======================>"); console.info("=============ANS_Remove_0100 onConsume end=======================>");
} }
...@@ -58,9 +58,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -58,9 +58,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0100 * @tc.number: ANS_Remove_0100
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
* @tc.desc: Verify that the call interface remove(hashCode: string, callback: AsyncCallback<void>): void * @tc.desc: Verify that the call interface remove
deletes the notification information through hashcode * deletes the notification information through hashcode
*/ */
it('ANS_Remove_0100', 0, async function (done) { it('ANS_Remove_0100', 0, async function (done) {
console.info("===============ANS_Remove_0100==========================>"); console.info("===============ANS_Remove_0100==========================>");
...@@ -118,7 +118,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -118,7 +118,7 @@ describe('ActsAnsNotificationRemove', function () {
console.info("================ANS_Remove_0200 onConsume data================>" + JSON.stringify(data)); console.info("================ANS_Remove_0200 onConsume data================>" + JSON.stringify(data));
hashCode = data.request.hashCode hashCode = data.request.hashCode
console.info("================ANS_Remove_0200 onConsume hascode:========>" + data.request.hashCode); console.info("================ANS_Remove_0200 onConsume hascode:========>" + data.request.hashCode);
notify.remove(hashCode); notify.remove(hashCode, notify.RemoveReason.CANCEL_REASON_REMOVE);
console.info("================ANS_Remove_0200 onConsume remove============>"); console.info("================ANS_Remove_0200 onConsume remove============>");
console.info("================ANS_Remove_0200 onConsume end===============>"); console.info("================ANS_Remove_0200 onConsume end===============>");
} }
...@@ -134,9 +134,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -134,9 +134,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0200 * @tc.number: ANS_Remove_0200
* @tc.name: remove(hashCode: string): Promise<void>; * @tc.name: remove(hashCode: string, reason: RemoveReason): Promise<void>;
* @tc.desc: Verify that the call interface remove(hashCode: string): Promise<void> * @tc.desc: Verify that the call interface remove to
deletes the notification information through hashcode * deletes the notification information through hashcode
*/ */
it('ANS_Remove_0200', 0, async function (done) { it('ANS_Remove_0200', 0, async function (done) {
console.info("===============ANS_Remove_0200==========================>"); console.info("===============ANS_Remove_0200==========================>");
...@@ -191,7 +191,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -191,7 +191,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveErrHashCode(data) { function onConsumeRemoveErrHashCode(data) {
console.info("================ANS_Remove_0300 onConsume start=======================>"); console.info("================ANS_Remove_0300 onConsume start=======================>");
console.info("================ANS_Remove_0300 onConsume data:=============>" + JSON.stringify(data)); console.info("================ANS_Remove_0300 onConsume data:=============>" + JSON.stringify(data));
notify.remove("errorHashCode",removeErrHashCodeCallBack); notify.remove("errorHashCode", notify.RemoveReason.CANCEL_REASON_REMOVE, removeErrHashCodeCallBack);
console.info("================ANS_Remove_0300 onConsume remove=======================>"); console.info("================ANS_Remove_0300 onConsume remove=======================>");
console.info("================ANS_Remove_0300 onConsume end=======================>"); console.info("================ANS_Remove_0300 onConsume end=======================>");
} }
...@@ -209,9 +209,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -209,9 +209,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0300 * @tc.number: ANS_Remove_0300
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void
* @tc.desc: Verify that the error hashcode is used to call the interface * @tc.desc: Verify that the error hashcode is used to call the interface remove
remove(hashCode: string, callback: AsyncCallback<void>) to delete the notification information * to delete the notification information
*/ */
it('ANS_Remove_0300', 0, async function (done) { it('ANS_Remove_0300', 0, async function (done) {
console.info("===============ANS_Remove_0300==========================>"); console.info("===============ANS_Remove_0300==========================>");
...@@ -265,7 +265,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -265,7 +265,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveErrHashCodePromise(data) { function onConsumeRemoveErrHashCodePromise(data) {
console.info("===========ANS_Remove_0400 onConsume start:===========>"); console.info("===========ANS_Remove_0400 onConsume start:===========>");
console.info("===========ANS_Remove_0400 onConsume data:===========>" + JSON.stringify(data)); console.info("===========ANS_Remove_0400 onConsume data:===========>" + JSON.stringify(data));
notify.remove("errorHashCode").then((data)=>{ notify.remove("errorHashCode", notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("===========ANS_Remove_0400 onConsume remove data:===========>" + JSON.stringify(data)); console.info("===========ANS_Remove_0400 onConsume remove data:===========>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("===========ANS_Remove_0400 onConsume remove err:============>" + JSON.stringify(err)); console.info("===========ANS_Remove_0400 onConsume remove err:============>" + JSON.stringify(err));
...@@ -282,9 +282,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -282,9 +282,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0400 * @tc.number: ANS_Remove_0400
* @tc.name: remove(hashCode: string): Promise<void> * @tc.name: remove(hashCode: string, reason: RemoveReason): Promise<void>
* @tc.desc: Verify that the error hashcode is used to call the interface * @tc.desc: Verify that the error hashcode is used to call the interface remove
remove(hashCode: string): Promise<void> to delete the notification information * to delete the notification information
*/ */
it('ANS_Remove_0400', 0, async function (done) { it('ANS_Remove_0400', 0, async function (done) {
console.info("===============ANS_Remove_0400==========================>"); console.info("===============ANS_Remove_0400==========================>");
...@@ -338,7 +338,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -338,7 +338,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveUseEmptyCharacter(data) { function onConsumeRemoveUseEmptyCharacter(data) {
console.info("================ANS_Remove_0500 onConsume start==============>"); console.info("================ANS_Remove_0500 onConsume start==============>");
console.info("================ANS_Remove_0500 onConsume data:==============>" + JSON.stringify(data)); console.info("================ANS_Remove_0500 onConsume data:==============>" + JSON.stringify(data));
notify.remove('',removeCallBackUseEmptyCharacter); notify.remove('', notify.RemoveReason.CANCEL_REASON_REMOVE, removeCallBackUseEmptyCharacter);
console.info("================ANS_Remove_0500 onConsume remove=============>"); console.info("================ANS_Remove_0500 onConsume remove=============>");
console.info("================ANS_Remove_0500 onConsume end================>"); console.info("================ANS_Remove_0500 onConsume end================>");
} }
...@@ -359,10 +359,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -359,10 +359,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0500 * @tc.number: ANS_Remove_0500
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
* @tc.desc: Verify that the Empty Character hashcode is used to call the interface * @tc.desc: Verify that the Empty Character hashcode is used to call the interface remove
remove(hashCode: string, callback: AsyncCallback<void>): void * to delete the notification information
to delete the notification information
*/ */
it('ANS_Remove_0500', 0, async function (done) { it('ANS_Remove_0500', 0, async function (done) {
console.info("===============ANS_Remove_0500==========================>"); console.info("===============ANS_Remove_0500==========================>");
...@@ -416,7 +415,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -416,7 +415,7 @@ describe('ActsAnsNotificationRemove', function () {
function OnConsumeRemoveUseEmptyCharacterPromise(data) { function OnConsumeRemoveUseEmptyCharacterPromise(data) {
console.info("===============ANS_Remove_0600 onConsume start==================>"); console.info("===============ANS_Remove_0600 onConsume start==================>");
console.info("===============ANS_Remove_0600 onConsume data:==================>" + JSON.stringify(data)); console.info("===============ANS_Remove_0600 onConsume data:==================>" + JSON.stringify(data));
notify.remove('').then((data)=>{ notify.remove('', notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("===========ANS_Remove_0600 onConsume remove data:============>" + JSON.stringify(data)); console.info("===========ANS_Remove_0600 onConsume remove data:============>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("===========ANS_Remove_0600 onConsume remove err:=============>" + JSON.stringify(err)); console.info("===========ANS_Remove_0600 onConsume remove err:=============>" + JSON.stringify(err));
...@@ -435,9 +434,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -435,9 +434,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0600 * @tc.number: ANS_Remove_0600
* @tc.name: remove(hashCode: string): Promise<void>; * @tc.name: remove(hashCode: string, reason: RemoveReason): Promise<void>;
* @tc.desc: Verify that the Empty Character hashcode is used to call the interface * @tc.desc: Verify that the Empty Character hashcode is used to call the interface remove
remove(hashCode: string): Promise<void> to delete the notification information * to delete the notification information
*/ */
it('ANS_Remove_0600', 0, async function (done) { it('ANS_Remove_0600', 0, async function (done) {
console.info("===============ANS_Remove_0600 start==========================>"); console.info("===============ANS_Remove_0600 start==========================>");
...@@ -491,7 +490,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -491,7 +490,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveNotExistHashCode(data) { function onConsumeRemoveNotExistHashCode(data) {
console.info("==============ANS_Remove_0700 onConsume start===================>"); console.info("==============ANS_Remove_0700 onConsume start===================>");
console.info("==============ANS_Remove_0700 onConsume data:===================>" + JSON.stringify(data)); console.info("==============ANS_Remove_0700 onConsume data:===================>" + JSON.stringify(data));
notify.remove("9999_9999_9",removeNotExistHashCodeCallBack); notify.remove("9999_9999_9", notify.RemoveReason.CANCEL_REASON_REMOVE, removeNotExistHashCodeCallBack);
console.info("==============ANS_Remove_0700 onConsume remove===================>"); console.info("==============ANS_Remove_0700 onConsume remove===================>");
console.info("==============ANS_Remove_0700 onConsume end===================>"); console.info("==============ANS_Remove_0700 onConsume end===================>");
} }
...@@ -512,9 +511,8 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -512,9 +511,8 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0700 * @tc.number: ANS_Remove_0700
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
* @tc.desc: Verify that the not exist hashCode is used to call the interface * @tc.desc: Verify that the not exist hashCode is used to call the interface remove
* remove(hashCode: string, callback: AsyncCallback<void>): void
* to delete the notification information * to delete the notification information
*/ */
it('ANS_Remove_0700', 0, async function (done) { it('ANS_Remove_0700', 0, async function (done) {
...@@ -569,7 +567,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -569,7 +567,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveNotExistHashCodePromise(data) { function onConsumeRemoveNotExistHashCodePromise(data) {
console.info("================ANS_Remove_0800 onConsume start===============>"); console.info("================ANS_Remove_0800 onConsume start===============>");
console.info("================ANS_Remove_0800 onConsume data:===============>" + JSON.stringify(data)); console.info("================ANS_Remove_0800 onConsume data:===============>" + JSON.stringify(data));
notify.remove("9999_9999_9").then((data)=>{ notify.remove("9999_9999_9", notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("===========ANS_Remove_0800 onConsume remove data:=========>" + JSON.stringify(data)); console.info("===========ANS_Remove_0800 onConsume remove data:=========>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("===========ANS_Remove_0800 onConsume remove err:==========>" + JSON.stringify(err)); console.info("===========ANS_Remove_0800 onConsume remove err:==========>" + JSON.stringify(err));
...@@ -588,9 +586,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -588,9 +586,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0800 * @tc.number: ANS_Remove_0800
* @tc.name: remove(hashCode: string): Promise<void>; * @tc.name: remove(hashCode: string, reason: RemoveReason): Promise<void>;
* @tc.desc: Verify that the not exist hashCode is used to call the interface remove(hashCode: string, * @tc.desc: Verify that the not exist hashCode is used to call the interface remove
* callback: AsyncCallback<void>): void to delete the notification information * to delete the notification information
*/ */
it('ANS_Remove_0800', 0, async function (done) { it('ANS_Remove_0800', 0, async function (done) {
console.info("===============ANS_Remove_0800==========================>"); console.info("===============ANS_Remove_0800==========================>");
...@@ -644,7 +642,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -644,7 +642,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveNonComplianceHashCode(data) { function onConsumeRemoveNonComplianceHashCode(data) {
console.info("================ANS_Remove_0900 onConsume start===================>"); console.info("================ANS_Remove_0900 onConsume start===================>");
console.info("================ANS_Remove_0900 onConsume data: ==================>" + JSON.stringify(data)); console.info("================ANS_Remove_0900 onConsume data: ==================>" + JSON.stringify(data));
notify.remove("哈希码",removeNonComplianceHashCallBack); notify.remove("哈希码", notify.RemoveReason.CANCEL_REASON_REMOVE, removeNonComplianceHashCallBack);
console.info("================ANS_Remove_0900 onConsume remove==================>"); console.info("================ANS_Remove_0900 onConsume remove==================>");
console.info("================ANS_Remove_0900 onConsume end=====================>"); console.info("================ANS_Remove_0900 onConsume end=====================>");
} }
...@@ -666,9 +664,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -666,9 +664,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_0900 * @tc.number: ANS_Remove_0900
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
* @tc.desc: Verify that the non compliance hashCode is used to call the interface remove(hashCode: string, * @tc.desc: Verify that the non compliance hashCode is used to call the interface remove
* callback: AsyncCallback<void>): void to delete the notification information * to delete the notification information
*/ */
it('ANS_Remove_0900', 0, async function (done) { it('ANS_Remove_0900', 0, async function (done) {
console.info("===============ANS_Remove_0900==========================>"); console.info("===============ANS_Remove_0900==========================>");
...@@ -722,7 +720,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -722,7 +720,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveNonComplianceHashCodePromise(data) { function onConsumeRemoveNonComplianceHashCodePromise(data) {
console.info("================ANS_Remove_1000 onConsume start===========>"); console.info("================ANS_Remove_1000 onConsume start===========>");
console.info("================ANS_Remove_1000 onConsume data:===========>" + JSON.stringify(data)); console.info("================ANS_Remove_1000 onConsume data:===========>" + JSON.stringify(data));
notify.remove("哈希码").then((data)=>{ notify.remove("哈希码", notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("===========ANS_Remove_1000 onConsume remove data:===========>" + JSON.stringify(data)); console.info("===========ANS_Remove_1000 onConsume remove data:===========>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("===========ANS_Remove_1000 onConsume remove err:===========>" + JSON.stringify(err)); console.info("===========ANS_Remove_1000 onConsume remove err:===========>" + JSON.stringify(err));
...@@ -740,9 +738,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -740,9 +738,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_1000 * @tc.number: ANS_Remove_1000
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
* @tc.desc: Verify that the non compliance hashCode is used to call the interface * @tc.desc: Verify that the non compliance hashCode is used to call the interface remove
remove(hashCode: string, callback: AsyncCallback<void>): void to delete the notification information * to delete the notification information
*/ */
it('ANS_Remove_1000', 0, async function (done) { it('ANS_Remove_1000', 0, async function (done) {
console.info("===============ANS_Remove_1000==========================>"); console.info("===============ANS_Remove_1000==========================>");
...@@ -803,7 +801,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -803,7 +801,7 @@ describe('ActsAnsNotificationRemove', function () {
console.info("=====ANS_Remove_1100 removeCallBack2TimesOf1 start============>"); console.info("=====ANS_Remove_1100 removeCallBack2TimesOf1 start============>");
console.info("=====ANS_Remove_1100 removeCallBack2TimesOf1 err========>" + JSON.stringify(err)); console.info("=====ANS_Remove_1100 removeCallBack2TimesOf1 err========>" + JSON.stringify(err));
expect(err.code).assertEqual(0); expect(err.code).assertEqual(0);
notify.remove(hashCode1100,removeCallBack2TimesOf2); notify.remove(hashCode1100, notify.RemoveReason.CANCEL_REASON_REMOVE, removeCallBack2TimesOf2);
console.info("=====ANS_Remove_1100 removeCallBack2TimesOf1 end============>"); console.info("=====ANS_Remove_1100 removeCallBack2TimesOf1 end============>");
} }
let hashCode1100; let hashCode1100;
...@@ -811,7 +809,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -811,7 +809,7 @@ describe('ActsAnsNotificationRemove', function () {
console.info("=====ANS_Remove_1100 onConsume start=================>"); console.info("=====ANS_Remove_1100 onConsume start=================>");
console.info("=====ANS_Remove_1100 onConsume data: ================>" + JSON.stringify(data)); console.info("=====ANS_Remove_1100 onConsume data: ================>" + JSON.stringify(data));
hashCode1100 = data.request.hashCode; hashCode1100 = data.request.hashCode;
notify.remove(data.request.hashCode,removeCallBack2TimesOf1); notify.remove(data.request.hashCode, notify.RemoveReason.CANCEL_REASON_REMOVE, removeCallBack2TimesOf1);
console.info("=====ANS_Remove_1100 onConsume remove================>"); console.info("=====ANS_Remove_1100 onConsume remove================>");
console.info("=====ANS_Remove_1100 onConsume end===================>"); console.info("=====ANS_Remove_1100 onConsume end===================>");
} }
...@@ -830,9 +828,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -830,9 +828,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_1100 * @tc.number: ANS_Remove_1100
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
* @tc.desc: Verify that the interface remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.desc: Verify that the interface remove
is called twice in a row to delete the notification information * is called twice in a row to delete the notification information
*/ */
it('ANS_Remove_1100', 0, async function (done) { it('ANS_Remove_1100', 0, async function (done) {
console.info("===============ANS_Remove_1100==========================>"); console.info("===============ANS_Remove_1100==========================>");
...@@ -888,13 +886,13 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -888,13 +886,13 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeCallbackRemove2TimesPromise(data) { function onConsumeCallbackRemove2TimesPromise(data) {
console.info("=======ANS_Remove_1200 onConsume start=============>"); console.info("=======ANS_Remove_1200 onConsume start=============>");
console.info("=======ANS_Remove_1200 onConsume data:=============>" + JSON.stringify(data)); console.info("=======ANS_Remove_1200 onConsume data:=============>" + JSON.stringify(data));
notify.remove(data.request.hashCode).then(()=>{ notify.remove(data.request.hashCode, notify.RemoveReason.CANCEL_REASON_REMOVE).then(()=>{
console.info("=======ANS_Remove_1200 onConsume remove_2times1:=======>"); console.info("=======ANS_Remove_1200 onConsume remove_2times1:=======>");
}).catch((err)=>{ }).catch((err)=>{
console.info("=======ANS_Remove_1200 onConsume remove_2times1 err:========>" + JSON.stringify(err)); console.info("=======ANS_Remove_1200 onConsume remove_2times1 err:========>" + JSON.stringify(err));
expect(err.code == 0).assertEqual(true); expect(err.code == 0).assertEqual(true);
}); });
notify.remove(data.request.hashCode).then((data)=>{ notify.remove(data.request.hashCode, notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("=======ANS_Remove_1200 onConsume remove_2times2 data:=======>" + JSON.stringify(data)); console.info("=======ANS_Remove_1200 onConsume remove_2times2 data:=======>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("=======ANS_Remove_1200 onConsume remove_2times2 err:========>" + JSON.stringify(err)); console.info("=======ANS_Remove_1200 onConsume remove_2times2 err:========>" + JSON.stringify(err));
...@@ -918,8 +916,8 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -918,8 +916,8 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_1200 * @tc.number: ANS_Remove_1200
* @tc.name: remove(hashCode: string): Promise<void>; * @tc.name: remove(hashCode: string, reason: RemoveReason): Promise<void>;
* @tc.desc: Verify that the interface remove(hashCode: string): Promise<void> is called twice in a row to * @tc.desc: Verify that the interface remove is called twice in a row to
* delete the notification information * delete the notification information
*/ */
it('ANS_Remove_1200', 0, async function (done) { it('ANS_Remove_1200', 0, async function (done) {
...@@ -975,7 +973,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -975,7 +973,7 @@ describe('ActsAnsNotificationRemove', function () {
function onConsumeRemoveIsUnremovable(data) { function onConsumeRemoveIsUnremovable(data) {
console.info("==========ANS_Remove_1300 onConsume start=================>"); console.info("==========ANS_Remove_1300 onConsume start=================>");
console.info("==========ANS_Remove_1300 onConsume data:=================>" + JSON.stringify(data)); console.info("==========ANS_Remove_1300 onConsume data:=================>" + JSON.stringify(data));
notify.remove(data.request.hashCode,removeIsUnremovableCallBack); notify.remove(data.request.hashCode, notify.RemoveReason.CANCEL_REASON_REMOVE, removeIsUnremovableCallBack);
console.info("==========ANS_Remove_1300 onConsume remove==============>"); console.info("==========ANS_Remove_1300 onConsume remove==============>");
console.info("==========ANS_Remove_1300 onConsume end=================>"); console.info("==========ANS_Remove_1300 onConsume end=================>");
} }
...@@ -995,8 +993,8 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -995,8 +993,8 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_1300 * @tc.number: ANS_Remove_1300
* @tc.name: remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.name: remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
* @tc.desc: Verify that the calling interface remove(hashCode: string, callback: AsyncCallback<void>): void; * @tc.desc: Verify that the calling interface remove
* deletes the notification information that the property isunremovable is true * deletes the notification information that the property isunremovable is true
*/ */
it('ANS_Remove_1300', 0, async function (done) { it('ANS_Remove_1300', 0, async function (done) {
...@@ -1051,7 +1049,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -1051,7 +1049,7 @@ describe('ActsAnsNotificationRemove', function () {
function OnConsumeRemoveIsUnremovablePromise(data) { function OnConsumeRemoveIsUnremovablePromise(data) {
console.info("==============ANS_Remove_1400 onConsume start==============>"); console.info("==============ANS_Remove_1400 onConsume start==============>");
console.info("==============ANS_Remove_1400 onConsume data:==============>" + JSON.stringify(data)); console.info("==============ANS_Remove_1400 onConsume data:==============>" + JSON.stringify(data));
notify.remove(data.request.hashCode).then((data)=>{ notify.remove(data.request.hashCode, notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("=======ANS_Remove_1400 onConsume remove data:=======>" + JSON.stringify(data)); console.info("=======ANS_Remove_1400 onConsume remove data:=======>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("=======ANS_Remove_1400 onConsume remove err:========>" + JSON.stringify(err)); console.info("=======ANS_Remove_1400 onConsume remove err:========>" + JSON.stringify(err));
...@@ -1068,9 +1066,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -1068,9 +1066,9 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_1400 * @tc.number: ANS_Remove_1400
* @tc.name: remove(hashCode: string): Promise<void>; * @tc.name: remove(hashCode: string, reason: RemoveReason): Promise<void>;
* @tc.desc: Verify that the calling interface remove(hashCode: string): Promise<void>; * @tc.desc: Verify that the calling interface remove
deletes the notification information that the property isunremovable is true * deletes the notification information that the property isunremovable is true
*/ */
it('ANS_Remove_1400', 0, async function (done) { it('ANS_Remove_1400', 0, async function (done) {
console.info("===============ANS_Remove_1400 start==========================>"); console.info("===============ANS_Remove_1400 start==========================>");
...@@ -1778,7 +1776,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -1778,7 +1776,7 @@ describe('ActsAnsNotificationRemove', function () {
* @tc.number: ANS_Remove_2200 * @tc.number: ANS_Remove_2200
* @tc.name: removeAll(bundle: BundleOption, callback: AsyncCallback<void>):void; * @tc.name: removeAll(bundle: BundleOption, callback: AsyncCallback<void>):void;
* @tc.desc: Verify that the removeAll(bundle: BundleOption, callback: AsyncCallback<void>):void * @tc.desc: Verify that the removeAll(bundle: BundleOption, callback: AsyncCallback<void>):void
interface is called to delete the notification information whose attribute isUnremovable is true * interface is called to delete the notification information whose attribute isUnremovable is true
*/ */
it('ANS_Remove_2200', 0, async function (done) { it('ANS_Remove_2200', 0, async function (done) {
console.info("===============ANS_Remove_2200 start==========================>"); console.info("===============ANS_Remove_2200 start==========================>");
...@@ -2394,7 +2392,8 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2394,7 +2392,8 @@ describe('ActsAnsNotificationRemove', function () {
id:data.request.id, id:data.request.id,
label:data.request.label label:data.request.label
} }
notify.remove(bundleOption,notificationKey,removeByNotificationKeyCB); notify.remove(bundleOption, notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE,
removeByNotificationKeyCB);
console.info("=============ANS_Remove_2900 onConsume remove=======================>"); console.info("=============ANS_Remove_2900 onConsume remove=======================>");
console.info("=============ANS_Remove_2900 onConsume end=======================>"); console.info("=============ANS_Remove_2900 onConsume end=======================>");
} }
...@@ -2416,10 +2415,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2416,10 +2415,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_2900 * @tc.number: ANS_Remove_2900
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, callback: AsyncCallback<void>): void; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveReason,
* @tc.desc: Verify that the calling interface remove(bundle: BundleOption, notificationKey: NotificationKey, * callback: AsyncCallback<void>): void;
* callback: AsyncCallback<void>): void; deletes notification information through BundleOption and * @tc.desc: Verify that the calling interface remove
* NotificationKey * deletes notification information through BundleOption and NotificationKey
*/ */
it('ANS_Remove_2900', 0, async function (done) { it('ANS_Remove_2900', 0, async function (done) {
console.info("===============ANS_Remove_2900 start==========================>"); console.info("===============ANS_Remove_2900 start==========================>");
...@@ -2481,7 +2480,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2481,7 +2480,7 @@ describe('ActsAnsNotificationRemove', function () {
id:30, id:30,
label:"3000" label:"3000"
} }
notify.remove(bundleOption,notificationKey) notify.remove(bundleOption,notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE)
console.info("==========ANS_Remove_3000 onConsume remove==============>"); console.info("==========ANS_Remove_3000 onConsume remove==============>");
console.info("==========ANS_Remove_3000 onConsume end=================>"); console.info("==========ANS_Remove_3000 onConsume end=================>");
} }
...@@ -2495,10 +2494,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2495,10 +2494,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_3000 * @tc.number: ANS_Remove_3000
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey): Promise<void>; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey,
* @tc.desc: Verify that the calling interface * reason: RemoveReason): Promise<void>;
remove(bundle: BundleOption, notificationKey: NotificationKey): Promise<void> * @tc.desc: Verify that the calling interface remove
deletes notification information through BundleOption and NotificationKey * deletes notification information through BundleOption and NotificationKey
*/ */
it('ANS_Remove_3000', 0, async function (done) { it('ANS_Remove_3000', 0, async function (done) {
console.info("===============ANS_Remove_3000 start==========================>"); console.info("===============ANS_Remove_3000 start==========================>");
...@@ -2560,7 +2559,8 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2560,7 +2559,8 @@ describe('ActsAnsNotificationRemove', function () {
id:0, id:0,
label:"wrongLabel" label:"wrongLabel"
} }
notify.remove(bundleOption,notificationKey,removeByNotificationKeyCBWrongKey); notify.remove(bundleOption, notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE,
removeByNotificationKeyCBWrongKey);
console.info("==========ANS_Remove_3100 onConsume remove==========>"); console.info("==========ANS_Remove_3100 onConsume remove==========>");
console.info("==========ANS_Remove_3100 onConsume end=============>"); console.info("==========ANS_Remove_3100 onConsume end=============>");
} }
...@@ -2580,9 +2580,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2580,9 +2580,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_3100 * @tc.number: ANS_Remove_3100
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, callback: AsyncCallback<void>): void; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveReason,
* @tc.desc: Verify that the calling interface remove(bundle: BundleOption, notificationKey: NotificationKey, * callback: AsyncCallback<void>): void;
* callback: AsyncCallback<void>): void; deletes notification information through BundleOption and * @tc.desc: Verify that the calling interface remove
* deletes notification information through BundleOption and
* NotificationKey correct bundleOption,wrong notificationKey. * NotificationKey correct bundleOption,wrong notificationKey.
*/ */
it('ANS_Remove_3100', 0, async function (done) { it('ANS_Remove_3100', 0, async function (done) {
...@@ -2645,7 +2646,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2645,7 +2646,7 @@ describe('ActsAnsNotificationRemove', function () {
id:0, id:0,
label:"wrongLabel" label:"wrongLabel"
} }
notify.remove(bundleOption, notificationKey).then((data)=>{ notify.remove(bundleOption, notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("=======ANS_Remove_3200 onConsume remove data:=======>" + JSON.stringify(data)); console.info("=======ANS_Remove_3200 onConsume remove data:=======>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("=======ANS_Remove_3200 onConsume remove err:========>" + JSON.stringify(err)); console.info("=======ANS_Remove_3200 onConsume remove err:========>" + JSON.stringify(err));
...@@ -2663,9 +2664,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2663,9 +2664,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_3200 * @tc.number: ANS_Remove_3200
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, callback: AsyncCallback<void>): void; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveReason,
* @tc.desc: Verify that the calling interface remove(bundle: BundleOption, notificationKey: NotificationKey): * callback: AsyncCallback<void>): void;
* Promise<void> deletes notification information through BundleOption and NotificationKey correct * @tc.desc: Verify that the calling interface remove
* deletes notification information through BundleOption and NotificationKey correct
* bundleOption,wrong notificationKey. * bundleOption,wrong notificationKey.
*/ */
it('ANS_Remove_3200', 0, async function (done) { it('ANS_Remove_3200', 0, async function (done) {
...@@ -2728,7 +2730,8 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2728,7 +2730,8 @@ describe('ActsAnsNotificationRemove', function () {
id:33, id:33,
label:"3300" label:"3300"
} }
notify.remove(bundleOption,notificationKey,removeByNotificationKeyCBWrongBundle); notify.remove(bundleOption, notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE,
removeByNotificationKeyCBWrongBundle);
console.info("==============ANS_Remove_3300 onConsume remove===============>"); console.info("==============ANS_Remove_3300 onConsume remove===============>");
console.info("==============ANS_Remove_3300 onConsume end==================>"); console.info("==============ANS_Remove_3300 onConsume end==================>");
} }
...@@ -2748,9 +2751,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2748,9 +2751,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_3300 * @tc.number: ANS_Remove_3300
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, callback: AsyncCallback<void>): void; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveReason,
* @tc.desc: Verify that the calling interface remove(bundle: BundleOption, notificationKey: NotificationKey, * callback: AsyncCallback<void>): void;
* callback: AsyncCallback<void>): void; deletes notification information through BundleOption and * @tc.desc: Verify that the calling interface remove
* deletes notification information through BundleOption and
* NotificationKey wrong bundleOption,correct notificationKey. * NotificationKey wrong bundleOption,correct notificationKey.
*/ */
it('ANS_Remove_3300', 0, async function (done) { it('ANS_Remove_3300', 0, async function (done) {
...@@ -2813,7 +2817,7 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2813,7 +2817,7 @@ describe('ActsAnsNotificationRemove', function () {
id:34, id:34,
label:"3400" label:"3400"
} }
notify.remove(bundleOption, notificationKey).then((data)=>{ notify.remove(bundleOption, notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE).then((data)=>{
console.info("=======ANS_Remove_3400 onConsume remove data:=======>" + JSON.stringify(data)); console.info("=======ANS_Remove_3400 onConsume remove data:=======>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("=======ANS_Remove_3400 onConsume remove err:========>" + JSON.stringify(err)); console.info("=======ANS_Remove_3400 onConsume remove err:========>" + JSON.stringify(err));
...@@ -2831,9 +2835,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2831,9 +2835,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_3400 * @tc.number: ANS_Remove_3400
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, callback: AsyncCallback<void>): void; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveReason,
* @tc.desc: Verify that the calling interface remove(bundle: BundleOption, notificationKey: NotificationKey): * callback: AsyncCallback<void>): void;
* Promise<void> deletes notification information through BundleOption and NotificationKey correct * @tc.desc: Verify that the calling interface remove
* deletes notification information through BundleOption and NotificationKey correct
* bundleOption,wrong notificationKey. * bundleOption,wrong notificationKey.
*/ */
it('ANS_Remove_3400', 0, async function (done) { it('ANS_Remove_3400', 0, async function (done) {
...@@ -2910,8 +2915,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2910,8 +2915,10 @@ describe('ActsAnsNotificationRemove', function () {
id:35, id:35,
label:"3500" label:"3500"
} }
notify.remove(bundleOption,notificationKey,removeByNotificationKey2Times1CB); notify.remove(bundleOption, notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE,
notify.remove(bundleOption,notificationKey,removeByNotificationKey2Times2CB); removeByNotificationKey2Times1CB);
notify.remove(bundleOption, notificationKey, notify.RemoveReason.CANCEL_REASON_REMOVE,
removeByNotificationKey2Times2CB);
console.info("=========ANS_Remove_3500 onConsume remove==============>"); console.info("=========ANS_Remove_3500 onConsume remove==============>");
console.info("=========ANS_Remove_3500 onConsume end=================>"); console.info("=========ANS_Remove_3500 onConsume end=================>");
} }
...@@ -2931,9 +2938,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2931,9 +2938,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_3500 * @tc.number: ANS_Remove_3500
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, callback: AsyncCallback<void>): void; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveReason,
* @tc.desc: Verify that the interface remove(bundle: BundleOption, notificationKey: NotificationKey, callback: * callback: AsyncCallback<void>): void;
* AsyncCallback<void>): void; void; is called twice in a row to delete the notification information * @tc.desc: Verify that the interface remove
* is called twice in a row to delete the notification information
*/ */
it('ANS_Remove_3500', 0, async function (done) { it('ANS_Remove_3500', 0, async function (done) {
console.info("===============ANS_Remove_3500 start==========================>"); console.info("===============ANS_Remove_3500 start==========================>");
...@@ -2996,9 +3004,9 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -2996,9 +3004,9 @@ describe('ActsAnsNotificationRemove', function () {
id:36, id:36,
label:"3600" label:"3600"
} }
notify.remove(bundleOption, notificationKey) notify.remove(bundleOption, notificationKey, notify.RemoveReason.CLICK_REASON_REMOVE)
console.info("=========ANS_Remove_3600 onConsume remove1===========>"); console.info("=========ANS_Remove_3600 onConsume remove1===========>");
notify.remove(bundleOption, notificationKey).then((data)=>{ notify.remove(bundleOption, notificationKey, notify.RemoveReason.CLICK_REASON_REMOVE).then((data)=>{
console.info("=======ANS_Remove_3600 onConsume remove2 data:=======>" + JSON.stringify(data)); console.info("=======ANS_Remove_3600 onConsume remove2 data:=======>" + JSON.stringify(data));
}).catch((err)=>{ }).catch((err)=>{
console.info("=======ANS_Remove_3600 onConsume remove2 err:========>" + JSON.stringify(err)); console.info("=======ANS_Remove_3600 onConsume remove2 err:========>" + JSON.stringify(err));
...@@ -3022,9 +3030,10 @@ describe('ActsAnsNotificationRemove', function () { ...@@ -3022,9 +3030,10 @@ describe('ActsAnsNotificationRemove', function () {
/* /*
* @tc.number: ANS_Remove_3600 * @tc.number: ANS_Remove_3600
* @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey): Promise<void>; * @tc.name: remove(bundle: BundleOption, notificationKey: NotificationKey,
* @tc.desc: Verify that the interface remove(bundle: BundleOption, notificationKey: NotificationKey): * reason: RemoveReason): Promise<void>;
* Promise<void> is called twice in a row to delete the notification information * @tc.desc: Verify that the interface remove
* is called twice in a row to delete the notification information
*/ */
it('ANS_Remove_3600', 0, async function (done) { it('ANS_Remove_3600', 0, async function (done) {
console.info("===============ANS_Remove_3600 start==========================>"); console.info("===============ANS_Remove_3600 start==========================>");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册