diff --git a/appexecfwk/ams_standard/fwkdataaccessor/Test.json b/appexecfwk/ams_standard/fwkdataaccessor/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..5d6bddcf3b4ad86236117daf1351a208e68f3405 --- /dev/null +++ b/appexecfwk/ams_standard/fwkdataaccessor/Test.json @@ -0,0 +1,19 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "180000", + "package": "com.amsst.fwkdataaccessor", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "FWKDataAccessor.hap", + "amsStDataAbility.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/appexecfwk/ams_standard/fwkdataaccessor/entry/src/main/js/test/DataAbilityHelperJsSt.test.js b/appexecfwk/ams_standard/fwkdataaccessor/entry/src/main/js/test/DataAbilityHelperJsSt.test.js new file mode 100644 index 0000000000000000000000000000000000000000..6bf56224918a9d4413ff60c10697135ff74d076c --- /dev/null +++ b/appexecfwk/ams_standard/fwkdataaccessor/entry/src/main/js/test/DataAbilityHelperJsSt.test.js @@ -0,0 +1,4167 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import featureAbility from '@ohos.ability.featureAbility' +import ohosDataAbility from '@ohos.data.dataability' + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' + +describe('ActsDataAbilityHelperTest', function () { + let dataAbilityUri = ("dataability:///com.ix.VerifyActDataAbility"); + let dataAbilityUri2 = ("dataability:///com.ix.VerifyActDataAbility2"); + let DAHelper; + let gSetTimeout = 500 + + beforeAll(async (done) => { + console.debug('= ACTS_beforeAll ====: ' + DAHelper + " ,JSON. " + JSON.stringify(DAHelper)); + } catch (err) { + console.error('=ACTS_beforeAll acquireDataAbilityHelper catch(err)====>:' + err); + } + console.debug('= ACTS_beforeAll ==== { + console.debug('= ACTS_afterAll ====" + dataAbilityUri) + try { + var abilityHelper = featureAbility.acquireDataAbilityHelper(dataAbilityUri) + console.log('ACTS_AcquireDataAbilityHelper_0100 abilityHelper ====>: ' + + abilityHelper + " ,JSON. " + JSON.stringify(abilityHelper)) + expect(typeof (abilityHelper)).assertEqual("object"); + } catch (err) { + console.error('=ACTS_GetDataAbilityHelper_0100 acquireDataAbilityHelper catch(err)====>:' + err); + expect(false).assertTrue(); + } + done(); + console.log('ACTS_AcquireDataAbilityHelper_0100====: ' + + abilityHelper + " ,JSON. " + JSON.stringify(abilityHelper)) + if (JSON.stringify(abilityHelper) == 'undefined' || JSON.stringify(abilityHelper) == 'null') + expect(true).assertTrue(); + else + expect(false).assertTrue(); + } catch (err) { + console.error('=ACTS_GetDataAbilityHelper_0200 acquireDataAbilityHelper catch(err)====>:' + err); + expect(false).assertTrue(); + } + done(); + console.log('ACTS_AcquireDataAbilityHelper_0200====: ' + DAHelper) + let valueBucket + try { + DAHelper.insert(dataAbilityUri, valueBucket) + .then(function (data) { + console.debug("=ACTS_Insert_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(data).assertEqual(1); + ret = true; + done(); + }).catch(function (err) { + console.debug("=ACTS_Insert_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false; + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_Insert_0100 catch(err)====>:' + err); + ret = false; + expect(false).assertTrue(); + done(); + } + + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Insert_0100====: ' + DAHelper) + let valueBucket + try { + await DAHelper.insert(dataAbilityUri, valueBucket, + (err, data) => { + console.debug("=ACTS_Insert_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】data【") + data + (" 】;")); + expect(data).assertEqual(1); + ret = true; + done(); + } + ); + } catch (err) { + console.error('=ACTS_Insert_0200 catch(err)====>:' + err); + ret = false; + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Insert_0200==== { + console.debug("=ACTS_Insert_0300 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number"); + ret = true; + done(); + }).catch((err) => { + console.debug("=ACTS_Insert_0300 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false; + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_Insert_0300 catch(err)====>:' + err); + ret = false; + expect(false).assertTrue(); + done(); + } + + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Insert_0300====: ' + DAHelper) + const valueBucket = { + "name": "ACTS_Insert_0400_rose1", + "age": 221, + "salary": 20.5, + "blobType": "u8", + } + try { + await DAHelper.insert(dataAbilityUri, valueBucket, + (err, data) => { + console.debug("=ACTS_Insert_0400 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(data).assertEqual(1); + ret = true; + done(); + } + ); + } catch (err) { + console.error('=ACTS_Insert_0400 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Insert_0400====: ' + DAHelper) + var valueBucket; + try { + DAHelper.batchInsert( + dataAbilityUri, + valueBucket + ).then((data) => { + console.debug("=ACTS_BatchInsert_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】; ====>")); + expect(data).assertEqual(0); + ret = true; + done(); + }).catch((err) => { + console.debug("=ACTS_BatchInsert_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_BatchInsert_0100 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_BatchInsert_0100====: ' + DAHelper) + var valueBucket; + try { + await DAHelper.batchInsert( + dataAbilityUri, + valueBucket, + (err, data) => { + console.debug("=ACTS_BatchInsert_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(data).assertEqual(0); + ret = true; + done(); + }, + ); + } catch (err) { + console.error('=ACTS_BatchInsert_0200 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_BatchInsert_0200====: ' + DAHelper) + var valueBucketArray = new Array({}, {}, {}) + try { + DAHelper.batchInsert( + dataAbilityUri, + valueBucketArray, + ).then((data) => { + console.debug("=ACTS_BatchInsert_0300 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】; ====>")); + expect(data).assertEqual(3); + ret = true; + done(); + }).catch((err) => { + console.debug("=ACTS_BatchInsert_0300 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_BatchInsert_0300 batchInsert AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_BatchInsert_0300====: ' + DAHelper) + var valueBucketArray = new Array({}, {}, {}) + try { + await DAHelper.batchInsert( + dataAbilityUri, + valueBucketArray, + (err, data) => { + console.debug("=ACTS_BatchInsert_0400 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(data).assertEqual(3); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_BatchInsert_0400 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_BatchInsert_0400====: ' + DAHelper) + try { + const valueBucket = { + "name": "ACTS_BatchInsert_0500_roe1", + "age": 21, + "salary": 20.5, + } + var valueBucketArray = new Array({ "name": "BatchInsert_0500_roe11", "age": 21, "salary": 20.5, }, + { "name": "BatchInsert_0500_roe12", "age": 21, "salary": 20.5, }, + { "name": "BatchInsert_0500_roe13", "age": 21, "salary": 20.5, }) + + DAHelper.batchInsert( + dataAbilityUri, + valueBucketArray, + ).then((data) => { + console.debug("=ACTS_BatchInsert_0500 BatchInsert Promise then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(data).assertEqual(3); + ret = true + done(); + }).catch((err) => { + console.debug("=ACTS_BatchInsert_0500 BatchInsert Promise catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_BatchInsert_0500 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_BatchInsert_0500====: ' + DAHelper) + const valueBucket = { + "name": "BatchInsert_0600_roe1", + "age": 21, + "salary": 20.5, + } + var valueBucketArray = new Array({ "name": "BatchInsert_0600_roe11", "age": 21, "salary": 20.5, }, + { "name": "BatchInsert_0600_roe12", "age": 21, "salary": 20.5, }, + { "name": "BatchInsert_0600_roe13", "age": 21, "salary": 20.5, }) + try { + await DAHelper.batchInsert( + dataAbilityUri, + valueBucketArray, + (err, data) => { + console.debug("=ACTS_BatchInsert_0600 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(data).assertEqual(3); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_BatchInsert_0600 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_BatchInsert_0600====" + + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); + expect(typeof (queryPromise)).assertEqual("object"); + done(); + } catch (err) { + console.error('=ACTS_Query_0300 query catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Query_0300==== { + console.debug("=ACTS_Query_0400 query err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + + JSON.stringify(data) + (" 】;") + " , " + data); + expect(typeof (data)).assertEqual("object"); + ret = true + done(); + }); + } catch (err) { + console.error('=ACTS_Query_0400 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Query_0400====: ' + DAHelper) + try { + let valueBucketNull = {}; + let predicates = new ohosDataAbility.DataAbilityPredicates(); + console.debug("=ACTS_Update_0100 predicates====>" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + DAHelper.update( + dataAbilityUri, + valueBucketNull, + predicates + ).then((data) => { + console.debug("=ACTS_Update_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number"); + ret = true + done(); + }).catch((err) => { + console.debug("=ACTS_Update_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_Update_0100 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Update_0100====" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + await DAHelper.update( + dataAbilityUri, + valueBucketNull, + predicates, + (err, data) => { + console.debug("=ACTS_Update_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_Update_0200 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Update_0200====: ' + DAHelper) + const valueBucket = { "name": "ACTS_Update_0300_roe1", "age": 21, "salary": 20.5, } + try { + let predicates = new ohosDataAbility.DataAbilityPredicates(); + predicates.equalTo('contact_id', 1); + predicates.limitAs(10); + predicates.orderByAsc("order_by_class"); + predicates.offsetAs(1); + console.debug("=ACTS_Update_0300 predicates====>" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + DAHelper.update( + dataAbilityUri, + valueBucket, + predicates + ).then((data) => { + console.debug("=ACTS_Update_0300 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(data).assertEqual(1); + ret = true + done(); + }).catch((err) => { + console.debug("=ACTS_Update_0300 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_Update_0300 update catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Update_0300====: ' + DAHelper) + const valueBucket = { "name": "ACTS_Update_0400_roe1", "age": 21, "salary": 20.5, } + try { + let predicates = new ohosDataAbility.DataAbilityPredicates(); + predicates.equalTo('contact_id', 1); + predicates.limitAs(10); + predicates.orderByAsc("order_by_class"); + predicates.offsetAs(1); + console.debug("=ACTS_Update_0400 predicates====>" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + await DAHelper.update( + dataAbilityUri, + valueBucket, + predicates, + (err, data) => { + console.debug("=ACTS_Update_0400 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(data).assertEqual(1); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_Update_0400 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Update_0400====: ' + DAHelper) + try { + let predicates = new ohosDataAbility.DataAbilityPredicates(); + console.debug("=ACTS_Delete_0100 predicates====>" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + DAHelper.delete( + dataAbilityUri, + predicates + ).then((data) => { + console.debug("=ACTS_Delete_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number"); + ret = true + done(); + }).catch((err) => { + console.debug("=ACTS_Delete_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_Delete_0100 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Delete_0100====: ' + DAHelper) + try { + let predicates = new ohosDataAbility.DataAbilityPredicates(); + console.debug("=ACTS_Delete_0200 predicates====>" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + await DAHelper.delete( + dataAbilityUri, + predicates, + (err, data) => { + console.debug("=ACTS_Delete_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + expect(data).assertEqual(1); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_Delete_0200 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Delete_0200====" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + var datadelete = DAHelper.delete( + dataAbilityUri, + predicates + ).then((data) => { + console.debug("=ACTS_Delete_0300 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(data).assertEqual(1); + ret = true + done(); + }).catch((err) => { + console.debug("=ACTS_Delete_0300 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + console.debug("=ACTS_Delete_0300 datadelete====>" + + ("json datadelete 【") + JSON.stringify(datadelete) + (" 】") + " , " + datadelete); + } catch (err) { + console.error('=ACTS_Delete_0300 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Delete_0300====: ' + DAHelper) + try { + let predicates = new ohosDataAbility.DataAbilityPredicates(); + predicates.equalTo('contact_id', 1); + predicates.limitAs(10); + predicates.orderByAsc("order_by_class"); + predicates.offsetAs(1); + console.debug("=ACTS_Delete_0400 predicates====>" + + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); + await DAHelper.delete( + dataAbilityUri, + predicates, + (err, data) => { + console.debug("=ACTS_Delete_0400 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(data).assertEqual(1); + ret = true + done(); + }); + } catch (err) { + console.error('=ACTS_Delete_0400 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Delete_0400==== { + console.debug("=ACTS_GetFileTypes_0100 getFileTypes then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); + for (var i = 0; i < data.length; i++) { + expect(typeof (data[i])).assertEqual("string"); + console.log('=ACTS_GetFileTypes_0100 for data[' + i + '] ====>: ' + data[i]) + expect(data[i]).assertEqual(""); + } + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_GetFileTypes_0100 getFileTypes catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + console.log('featureAbility getFileTypes promise ====>: ' + promise) + } catch (err) { + console.error('=ACTS_GetFileTypes_0100 getFileTypes AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetFileTypes_0100====: ' + DAHelper) + let mimeTypeFilter = '*/*' + try { + await DAHelper.getFileTypes( + dataAbilityUri, + mimeTypeFilter, + (err, data) => { + console.debug("=ACTS_GetFileTypes_0200 getFileTypes err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + console.log('=ACTS_GetFileTypes_0200 data.length ====>: ' + data.length); + for (var i = 0; i < data.length; i++) { + expect(typeof (data[i])).assertEqual("string"); + console.log('=ACTS_GetFileTypes_0200 for data ====>: ' + err.code + + " data[" + i + "]: " + data[i]); + expect(data[i]).assertEqual(""); + } + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_GetFileTypes_0200 getFileTypes AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetFileTypes_0200==== { + console.debug("=ACTS_GetFileTypes_0300 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); + for (var i = 0; i < data.length; i++) { + expect(typeof (data[i])).assertEqual("string"); + console.log('= =ACTS_GetFileTypes_0300 for data[' + i + '] ====>: ' + data[i]) + expect(data[i]).assertEqual(""); + } + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_GetFileTypes_0300 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + console.log('DataAbilityHelper getFileTypes error ====>: ' + err) + ret = false + expect(false).assertTrue(); + done(); + }); + console.log('featureAbility getFileTypes promise ====>: ' + promise) + } catch (err) { + console.error('=ACTS_GetFileTypes_0300 getFileTypes AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetFileTypes_0300====: ' + DAHelper) + let mimeTypeFilter = 'image/*' + try { + await DAHelper.getFileTypes( + dataAbilityUri, + mimeTypeFilter, + (err, data) => { + console.debug("=ACTS_GetFileTypes_0400 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); + for (var i = 0; i < data.length; i++) { + expect(typeof (data[i])).assertEqual("string"); + console.log('=ACTS_GetFileTypes_0400 for ====>: ' + err.code + " data[" + i + "]: " + data[i]); + expect(data[i]).assertEqual(""); + } + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_GetFileTypes_0400 getFileTypes AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetFileTypes_0400==== { + console.debug("=ACTS_GetFileTypes_0500 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); + for (var i = 0; i < data.length; i++) { + expect(typeof (data[i])).assertEqual("string"); + console.log('=ACTS_GetFileTypes_0500 for data [' + i + '] ====>: ' + data[i]) + expect(data[i]).assertEqual(""); + } + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_GetFileTypes_0500 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + console.log('DataAbilityHelper getFileTypes error ====>: ' + err) + ret = false + done(); + }); + console.log('=ACTS_GetFileTypes_0500 promise ====>: ' + promise) + } catch (err) { + console.error('=ACTS_GetFileTypes_0500 getFileTypes AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetFileTypes_0500====: ' + DAHelper) + let mimeTypeFilter = '*/jpg' + try { + await DAHelper.getFileTypes( + dataAbilityUri, + mimeTypeFilter, + (err, data) => { + console.debug("=ACTS_GetFileTypes_0600 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + console.log('=ACTS_GetFileTypes_0600 data.length ====>: ' + data.length); + for (var i = 0; i < data.length; i++) { + expect(typeof (data[i])).assertEqual("string"); + console.log('=ACTS_GetFileTypes_0600 for errCode ====>: ' + err.code + + " data[" + i + "]: " + data[i]); + expect(data[i]).assertEqual(""); + } + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_GetFileTypes_0600 catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetFileTypes_0600==== { + console.debug("=ACTS_GetType_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + //expect(typeof(data)).assertEqual("string") + expect(data).assertEqual(dataAbilityUri); + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_GetFileTypes_0500 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + console.log('featureAbility getType promise ====>: ' + promise) + } catch (err) { + console.error('=ACTS_GetType_0100 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetType_0100====: ' + DAHelper) + try { + await DAHelper.getType( + dataAbilityUri, + (err, data) => { + console.debug("=ACTS_GetType_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + //expect(typeof(data)).assertEqual("string"); + expect(data).assertEqual(dataAbilityUri); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_GetType_0200 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_GetType_0200==== { + console.debug("=ACTS_OpenFile_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number") + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_OpenFile_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_OpenFile_0100 getType catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0100==== { + console.debug("=ACTS_OpenFile_0200 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number") + console.log('DataAbilityHelper ACTS_OpenFile_0200 OpenFile promise ====>: ' + data) + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_OpenFile_0200 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + done(); + }); + } catch (err) { + console.error('=ACTS_OpenFile_0200 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0200==== { + console.debug("=ACTS_OpenFile_0300 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number") + console.log('DataAbilityHelper ACTS_OpenFile_0300 OpenFile promise ====>: ' + data) + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_OpenFile_0300 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_OpenFile_0300 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0300==== { + console.debug("=ACTS_OpenFile_0400 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number") + console.log('DataAbilityHelper ACTS_OpenFile_0400 OpenFile promise ====>: ' + data) + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_OpenFile_0400 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_OpenFile_0400 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0400==== { + console.debug("=ACTS_OpenFile_0500 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number") + console.log('DataAbilityHelper ACTS_OpenFile_0500 OpenFile promise ====>: ' + data) + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_OpenFile_0500 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_OpenFile_0500 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0500==== { + console.debug("=ACTS_OpenFile_0600 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + expect(typeof (data)).assertEqual("number") + console.log('DataAbilityHelper ACTS_OpenFile_0600 OpenFile promise ====>: ' + data) + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_OpenFile_0600 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_OpenFile_0600 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0600====: ' + DAHelper) + var mode = "r"; + try { + DAHelper.openFile( + dataAbilityUri, + mode, + (err, data) => { + console.debug("=ACTS_OpenFile_0700 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + console.log('DataAbilityHelper ACTS_OpenFile_0700 OpenFile asyncCallback errCode ====>: ' + + err.code + " data: " + data); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_OpenFile_0700 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0700====: ' + DAHelper) + var mode = "w"; + try { + DAHelper.openFile( + dataAbilityUri, + mode, + (err, data) => { + console.debug("=ACTS_OpenFile_0800 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + console.log('DataAbilityHelper ACTS_OpenFile_0800 OpenFile asyncCallback errCode ====>: ' + + err.code + " data: " + data); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_OpenFile_0800 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0800====: ' + DAHelper) + var mode = "wt"; + try { + DAHelper.openFile( + dataAbilityUri, + mode, + (err, data) => { + console.debug("=ACTS_OpenFile_0900 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + console.log('DataAbilityHelper ACTS_OpenFile_0900 OpenFile asyncCallback errCode ====>: ' + + err.code + " data: " + data); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_OpenFile_0900 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_0900====: ' + DAHelper) + var mode = "wa"; + try { + DAHelper.openFile( + dataAbilityUri, + mode, + (err, data) => { + console.debug("=ACTS_OpenFile_1000 err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + console.log('DataAbilityHelper ACTS_OpenFile_1000 OpenFile asyncCallback errCode ====>: ' + + err.code + " data: " + data); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_OpenFile_1000 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_1000====: ' + DAHelper) + var mode = "rw"; + try { + DAHelper.openFile( + dataAbilityUri, + mode, + (err, data) => { + console.debug("=ACTS_OpenFile_1100 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_OpenFile_1100 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_1100====: ' + DAHelper) + var mode = "rwt"; + try { + DAHelper.openFile( + dataAbilityUri, + mode, + (err, data) => { + console.debug("=ACTS_OpenFile_1200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("number"); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_OpenFile_1200 getType AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_OpenFile_1200====: ' + DAHelper) + try { + DAHelper.release( + dataAbilityUri, + ).then((data) => { + console.debug("=ACTS_Release_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); + // expect(typeof(data)).assertEqual("boolean") + expect(data).assertEqual(true); + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_Release_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_Release_0100 release promise catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Release_0100====: ' + DAHelper) + try { + DAHelper.release( + dataAbilityUri, + (err, data) => { + console.debug("=ACTS_Release_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + console.log('featureAbility getDataAbilityHelper ACTS_Release_0100 data: ' + data) + //expect(typeof(data)).assertEqual("boolean"); + expect(data).assertEqual(false); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_Release_0200 release AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_Release_0200====: ' + DAHelper) + try { + DAHelper.normalizeUri( + dataAbilityUri, + ).then((data) => { + console.debug("=ACTS_NormalizeUri_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + //expect(typeof(data)).assertEqual("string") + expect(data).assertEqual(dataAbilityUri); + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_NormalizeUri_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_NormalizeUri_0100 normalizeUri promise catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_NormalizeUri_0100====: ' + DAHelper) + try { + DAHelper.normalizeUri( + dataAbilityUri, + (err, data) => { + console.debug("=ACTS_NormalizeUri_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + expect(typeof (data)).assertEqual("string"); + expect(data).assertEqual(dataAbilityUri); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_NormalizeUri_0200 normalizeUri AsyncCallback catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_NormalizeUri_0200====: ' + DAHelper) + try { + DAHelper.denormalizeUri( + dataAbilityUri, + ).then((data) => { + console.debug("=ACTS_DenormalizeUri_0100 then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】")); + //expect(typeof(data)).assertEqual("string") + expect(data).assertEqual(dataAbilityUri); + ret = true + done(); + }).catch(err => { + console.debug("=ACTS_DenormalizeUri_0100 catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + ret = false + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_DenormalizeUri_0100 denormalizeUri promise catch(err)====>:' + err); + ret = false + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_DenormalizeUri_0100====: ' + DAHelper) + try { + DAHelper.denormalizeUri( + dataAbilityUri, + (err, data) => { + console.debug("=ACTS_DenormalizeUri_0200 err,data=======>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); + //expect(typeof(data)).assertEqual("string"); + expect(data).assertEqual(dataAbilityUri); + ret = true + done(); + }, + ); + } catch (err) { + console.error('=ACTS_DenormalizeUri_0200 denormalizeUri AsyncCallback catch(err)====>:' + err); + ret = true + expect(false).assertTrue(); + done(); + } + setTimeout(function () { + console.log('setTimeout function====<'); + }, gSetTimeout); + console.log('ACTS_DenormalizeUri_0200==== { + if (err.code != 0) { + console.debug("=ACTS_OnOff_0100 err=======>" + + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0100); + done(); + } else { + currentAlertTimeout = setTimeout(() => { + console.debug('ACTS_OnOff_0100====< else true'); + done(); + }, gSetTimeout); + } + } + ); + } + } catch (err) { + console.error('=ACTS_OnOff_0100 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + console.log('ACTS_OnOff_0100===="); + expect(false).assertTrue(); + clearTimeout(currentAlertTimeout); + done(); + } + DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback_0200); + + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0200); + + setTimeout(mySetTimeout, gSetTimeout); + function mySetTimeout() { + DAHelper.notifyChange( + dataAbilityUri, + (err) => { + if (err.code != 0) { + console.debug("=ACTS_OnOff_0200 err=======>" + + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + done(); + } else { + currentAlertTimeout = setTimeout(() => { + console.debug('ACTS_OnOff_0200====:' + err); + expect(false).assertTrue(); + done(); + } + console.log('ACTS_OnOff_0200====" + caller); + if (flagCallback01 == 1 && flagCallback02 == 1 && flagCallback03 == 1) { + clearTimeout(currentAlertTimeout); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0301); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0302); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0303); + done(); + } else { + if (caller == "notifyChange") { + currentAlertTimeout = setTimeout(() => { + console.debug('ACTS_OnOff_0300==== { + expect(err.code).assertEqual(0); + waitDone("notifyChange"); + } + ); + } + } catch (err) { + console.error('=ACTS_OnOff_0300 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + console.log('ACTS_OnOff_0300====" + + ("json flagCallback02【") + JSON.stringify(flagCallback02) + (" 】") + " , " + flagCallback02); + expect(false).assertTrue(); + clearTimeout(currentAlertTimeout); + done(); + } + function onAsyncCallback0403(err) { + expect(err.code).assertEqual(0); + flagCallback03++; + waitDone("onAsyncCallback0403"); + } + function waitDone(caller) { + console.debug("=ACTS_OnOff_0400 caller ====>" + caller); + if (flagCallback01 == 1 && flagCallback02 == 0 && flagCallback03 == 1) { + clearTimeout(currentAlertTimeout); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0401); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0403); + done(); + } else { + if (caller == "notifyChange") { + currentAlertTimeout = setTimeout(() => { + console.debug('ACTS_OnOff_0400==== { + expect(err.code).assertEqual(0); + waitDone("notifyChange"); + } + ); + } + } catch (err) { + console.error('=ACTS_OnOff_0400 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + console.log('ACTS_OnOff_0400====" + + ("json err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + clearTimeout(currentAlertTimeout); + done(); + } + function onAsyncCallback0502(err) { + console.debug("=ACTS_OnOff_0500 err ====>" + + ("json err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + clearTimeout(currentAlertTimeout); + done(); + } + function onAsyncCallback0503(err) { + console.debug("=ACTS_OnOff_0500 err ====>" + + ("json err") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + clearTimeout(currentAlertTimeout); + done(); + } + try { + expect(typeof (DAHelper)).assertEqual("object"); + + DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0501); + DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0502); + DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0503); + + DAHelper.off("dataChange", dataAbilityUri); + + setTimeout(mySetTimeout, gSetTimeout); + function mySetTimeout() { + DAHelper.notifyChange( + dataAbilityUri, + (err) => { + if (err.code != 0) { + console.debug("=ACTS_OnOff_0500 err=======>" + + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + clearTimeout(currentAlertTimeout); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0100); + done(); + } else { + currentAlertTimeout = setTimeout(() => { + console.debug('ACTS_OnOff_0500====:' + err); + expect(false).assertTrue(); + done(); + } + console.log('ACTS_OnOff_0500====" + caller); + if (flagCallback01 == 2) { + clearTimeout(currentAlertTimeout); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0600); + DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback_0600); + done(); + } else { + if (caller == "notifyChange") { + currentAlertTimeout = setTimeout(() => { + console.debug('ACTS_OnOff_0600==== { + if (err.code != 0) { + console.debug("=ACTS_OnOff_0600 err=======>" + + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0600); + DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback_0600); + done(); + } else { + DAHelper2.notifyChange( + dataAbilityUri2, + (err) => { + if (err.code != 0) { + console.debug("=ACTS_OnOff_0600 err=======>" + + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0600); + DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback_0600); + done(); + } else { + waitDone("notifyChange"); + } + } + ); + } + } + ); + } + } catch (err) { + console.error('=ACTS_OnOff_0600 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + console.log('ACTS_OnOff_0600==== { + if (err.code != 0) { + console.debug("=ACTS_OnOff_0700 err=======>" + + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0700); + DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback_0700); + done(); + } else { + DAHelper2.notifyChange( + dataAbilityUri2, + (err) => { + if (err.code != 0) { + console.debug("=ACTS_OnOff_0700 err=======>" + + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); + expect(false).assertTrue(); + DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback_0700); + DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback_0700); + done(); + } else { + currentAlertTimeout = setTimeout(() => { + done(); + }, gSetTimeout); + } + } + ); + } + } + ); + } + } catch (err) { + console.error('=ACTS_OnOff_0700 catch(err)====>:' + err); + expect(false).assertTrue(); + done(); + } + console.log('ACTS_OnOff_0700==== { + console.debug("=ACTS_ExecuteBatch_Insert_0100 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data.length); + expect(true).assertTrue(); + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Insert_0100 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ") + " , " + err); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Insert_0100 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Insert_0100==== { + console.debug("=ACTS_ExecuteBatch_Insert_0200 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data.length); + expect(true).assertTrue(); + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Insert_0200 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ") + " , " + err); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Insert_0200 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Insert_0200==== { + console.debug("=ACTS_ExecuteBatch_Insert_0300 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data.length); + expect(true).assertTrue(); + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Insert_0300 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ") + " , " + err); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Insert_0300 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Insert_0300==== { + console.debug("=ACTS_ExecuteBatch_Insert_0400 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(err.code).assertEqual(0); + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Insert_0400 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Insert_0400==== { + console.debug("=ACTS_ExecuteBatch_Insert_0500 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(err.code).assertEqual(0); + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Insert_0500 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Insert_0500==== { + console.debug("=ACTS_ExecuteBatch_Insert_0600 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(err.code).assertEqual(0); + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Insert_0600 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Insert_0600==== { + console.debug("=ACTS_ExecuteBatch_Update_0100 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Update_0100 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Update_0100 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Update_0100 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Update_0100==== { + console.debug("=ACTS_ExecuteBatch_Update_0200 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Update_0200 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Update_0200 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Update_0200 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Update_0200==== { + console.debug("=ACTS_ExecuteBatch_Update_0300 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Update_0300 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Update_0300 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Update_0300 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Update_0300==== { + console.debug("=ACTS_ExecuteBatch_Update_0400 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + + JSON.stringify(data) + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Update_0400 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Update_0400 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Update_0400==== { + console.debug("=ACTS_ExecuteBatch_Update_0500 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Update_0300 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Update_0500 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Update_0500==== { + console.debug("=ACTS_ExecuteBatch_Update_0600 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Update_0300 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Update_0600 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Update_0600==== { + console.debug("=ACTS_ExecuteBatch_Assert_0100 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Assert_0100 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Assert_0100 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Assert_0100 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Assert_0100==== { + console.debug("=ACTS_ExecuteBatch_Assert_0200 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Assert_0200 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Assert_0200 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Assert_0200 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Assert_0200==== { + console.debug("=ACTS_ExecuteBatch_Assert_0300 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Assert_0300 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Assert_0300 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Assert_0300 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Assert_0300==== { + console.debug("=ACTS_ExecuteBatch_Assert_0400 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Assert_0400 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Assert_0400 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Assert_0400==== { + console.debug("=ACTS_ExecuteBatch_Assert_0500 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Assert_0500 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Assert_0500 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Assert_0500==== { + console.debug("=ACTS_ExecuteBatch_Assert_0600 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Assert_0600 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Assert_0600 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Assert_0600==== { + console.debug("=ACTS_ExecuteBatch_Delete_0100 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Delete_0100 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Delete_0100 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Delete_0100 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Delete_0100==== { + console.debug("=ACTS_ExecuteBatch_Delete_0200 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Delete_0200 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Delete_0200 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Delete_0200 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Delete_0200==== { + console.debug("=ACTS_ExecuteBatch_Delete_0300 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Delete_0300 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_Delete_0300 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Delete_0300 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Delete_0300==== { + console.debug("=ACTS_ExecuteBatch_Delete_0400 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Delete_0400 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Delete_0400 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Delete_0400==== { + console.debug("=ACTS_ExecuteBatch_Delete_0500 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Delete_0500 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Delete_0500 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Delete_0500==== { + console.debug("=ACTS_ExecuteBatch_Delete_0600 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_Delete_0600 for data[' + i + '].count ====>: ' + + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_Delete_0600 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_Delete_0600==== { + console.debug("=ACTS_ExecuteBatch_0100 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_0100 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_0100 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_0100 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_0100==== { + console.debug("=ACTS_ExecuteBatch_0200 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_0200 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_0200 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_0200==== { + console.debug("=ACTS_ExecuteBatch_0300 executeBatch then data====>" + + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_0300 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + }).catch((err) => { + console.debug("=ACTS_ExecuteBatch_0300 executeBatch catch err ====>" + + ("json err 【") + JSON.stringify(err) + (" 】 ")); + expect(false).assertTrue(); + done(); + }); + } catch (err) { + console.error('=ACTS_ExecuteBatch_0300 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_0300==== { + console.debug("=ACTS_ExecuteBatch_0400 executeBatch err,data====>" + + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + + (" 】;") + data.length); + expect(true).assertTrue(); + for (var i = 0; i < data.length; i++) { + console.debug('=ACTS_ExecuteBatch_0400 for data[' + i + '].count ====>: ' + data[i].count) + expect(data[i].count).assertEqual(1); + } + done(); + } + ); + } catch (err) { + console.error('=ACTS_ExecuteBatch_0400 catch(err)====>:' + + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); + expect(false).assertTrue(); + done(); + } + console.debug('ACTS_ExecuteBatch_0400====