提交 1a01ef57 编写于 作者: 1 15829070344

【OpenHarmony3.1Release】【账号】错误返回值undefined改为null

Signed-off-by: N15829070344 <hehaitao5@huawei.com>
上级 37adfc46
...@@ -30,10 +30,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -30,10 +30,10 @@ describe('ActsAccountAddAccount', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_first", (err)=>{ appAccountManager.addAccount("account_name_callback_first", (err)=>{
console.debug("====>add account ActsAccountAddAccount_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("account_name_callback_first", (err)=>{ appAccountManager.deleteAccount("account_name_callback_first", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_0100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_0100 end===="); console.debug("====>ActsAccountAddAccount_0100 end====");
done(); done();
}); });
...@@ -75,10 +75,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -75,10 +75,10 @@ describe('ActsAccountAddAccount', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_second", "account_extraInfo_callback_second", (err)=>{ appAccountManager.addAccount("account_name_callback_second", "account_extraInfo_callback_second", (err)=>{
console.debug("====>add account ActsAccountAddAccount_0300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("account_name_callback_second", (err)=>{ appAccountManager.deleteAccount("account_name_callback_second", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_0300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_0300 end===="); console.debug("====>ActsAccountAddAccount_0300 end====");
done(); done();
}); });
...@@ -120,13 +120,13 @@ describe('ActsAccountAddAccount', function () { ...@@ -120,13 +120,13 @@ describe('ActsAccountAddAccount', function () {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount("account_name_callback_third", "account_extraInfo_callback_third", (err)=>{ appAccountManager.addAccount("account_name_callback_third", "account_extraInfo_callback_third", (err)=>{
console.debug("====>add account first time ActsAccountAddAccount_0500 err:" + JSON.stringify(err)); console.debug("====>add account first time ActsAccountAddAccount_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.addAccount("account_name_callback_third", "account_extraInfo_callback_third", (err)=>{ appAccountManager.addAccount("account_name_callback_third", "account_extraInfo_callback_third", (err)=>{
console.debug("====>add account second time ActsAccountAddAccount_0500 err:" + JSON.stringify(err)); console.debug("====>add account second time ActsAccountAddAccount_0500 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_callback_third", (err)=>{ appAccountManager.deleteAccount("account_name_callback_third", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_0500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_0500 end===="); console.debug("====>ActsAccountAddAccount_0500 end====");
done(); done();
}); });
...@@ -291,10 +291,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -291,10 +291,10 @@ describe('ActsAccountAddAccount', function () {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount("account_name_callback_seventh", "", (err)=>{ appAccountManager.addAccount("account_name_callback_seventh", "", (err)=>{
console.debug("====>add account ActsAccountAddAccount_1300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("account_name_callback_seventh", (err)=>{ appAccountManager.deleteAccount("account_name_callback_seventh", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_1300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_1300 end===="); console.debug("====>ActsAccountAddAccount_1300 end====");
done(); done();
}); });
...@@ -372,10 +372,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -372,10 +372,10 @@ describe('ActsAccountAddAccount', function () {
var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890"; var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890";
appAccountManager.addAccount(specialStr, "account_extraInfo_callback_ninth", (err)=>{ appAccountManager.addAccount(specialStr, "account_extraInfo_callback_ninth", (err)=>{
console.debug("====>add account ActsAccountAddAccount_1700 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_1700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount(specialStr, (err)=>{ appAccountManager.deleteAccount(specialStr, (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_1700 err" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_1700 err" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_1700 end===="); console.debug("====>ActsAccountAddAccount_1700 end====");
done(); done();
}); });
...@@ -417,10 +417,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -417,10 +417,10 @@ describe('ActsAccountAddAccount', function () {
var specialStr = " "; var specialStr = " ";
appAccountManager.addAccount("account_name_callback_tenth", specialStr, (err)=>{ appAccountManager.addAccount("account_name_callback_tenth", specialStr, (err)=>{
console.debug("====>add account ActsAccountAddAccount_1900 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_1900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("account_name_callback_tenth", (err)=>{ appAccountManager.deleteAccount("account_name_callback_tenth", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_1900 err" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_1900 err" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_1900 end===="); console.debug("====>ActsAccountAddAccount_1900 end====");
done(); done();
}); });
...@@ -462,10 +462,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -462,10 +462,10 @@ describe('ActsAccountAddAccount', function () {
var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890"; var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890";
appAccountManager.addAccount("account_extraInfo_callback_eleventh", specialStr, (err)=>{ appAccountManager.addAccount("account_extraInfo_callback_eleventh", specialStr, (err)=>{
console.debug("====>add account ActsAccountAddAccount_2100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_2100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("account_extraInfo_callback_eleventh", (err)=>{ appAccountManager.deleteAccount("account_extraInfo_callback_eleventh", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_2100 err" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_2100 err" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_2100 end===="); console.debug("====>ActsAccountAddAccount_2100 end====");
done(); done();
}); });
...@@ -506,13 +506,13 @@ describe('ActsAccountAddAccount', function () { ...@@ -506,13 +506,13 @@ describe('ActsAccountAddAccount', function () {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount("account_name_callback_same", "account_extraInfo_callback", (err)=>{ appAccountManager.addAccount("account_name_callback_same", "account_extraInfo_callback", (err)=>{
console.debug("====>add account first time ActsAccountAddAccount_2300 err:" + JSON.stringify(err)); console.debug("====>add account first time ActsAccountAddAccount_2300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.addAccount("account_name_callback_same", "account_extraInfo_callback_different", (err)=>{ appAccountManager.addAccount("account_name_callback_same", "account_extraInfo_callback_different", (err)=>{
console.debug("====>add account second time ActsAccountAddAccount_2300 err:" + JSON.stringify(err)); console.debug("====>add account second time ActsAccountAddAccount_2300 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_callback_same", (err)=>{ appAccountManager.deleteAccount("account_name_callback_same", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_2300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_2300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_2300 end===="); console.debug("====>ActsAccountAddAccount_2300 end====");
done(); done();
}); });
...@@ -557,10 +557,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -557,10 +557,10 @@ describe('ActsAccountAddAccount', function () {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount(limitName, "account_extraInfo_callback", (err)=>{ appAccountManager.addAccount(limitName, "account_extraInfo_callback", (err)=>{
console.debug("====>add account ActsAccountAddAccount_2500 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_2500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount(limitName, (err)=>{ appAccountManager.deleteAccount(limitName, (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_2500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_2500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_2500 end===="); console.debug("====>ActsAccountAddAccount_2500 end====");
done(); done();
}); });
...@@ -608,10 +608,10 @@ describe('ActsAccountAddAccount', function () { ...@@ -608,10 +608,10 @@ describe('ActsAccountAddAccount', function () {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount("account_extra_callback_limit", limitExtra, (err)=>{ appAccountManager.addAccount("account_extra_callback_limit", limitExtra, (err)=>{
console.debug("====>add account ActsAccountAddAccount_2700 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAddAccount_2700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("account_extra_callback_limit", (err)=>{ appAccountManager.deleteAccount("account_extra_callback_limit", (err)=>{
console.debug("====>delete Account ActsAccountAddAccount_2700 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAddAccount_2700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAddAccount_2700 end===="); console.debug("====>ActsAccountAddAccount_2700 end====");
done(); done();
}); });
......
...@@ -53,13 +53,13 @@ describe('ActsAccountAppAccess', function () { ...@@ -53,13 +53,13 @@ describe('ActsAccountAppAccess', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("AppAccess_callback_itself", "extrainfo_callback_itself", (err)=>{ appAccountManager.addAccount("AppAccess_callback_itself", "extrainfo_callback_itself", (err)=>{
console.debug("====>add account ActsAccountAppAccess_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAppAccess_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.enableAppAccess("AppAccess_callback_itself", "com.example.actsaccountappaccess", (err)=>{ appAccountManager.enableAppAccess("AppAccess_callback_itself", "com.example.actsaccountappaccess", (err)=>{
console.debug("====>enableAppAccess err:" + JSON.stringify(err)); console.debug("====>enableAppAccess err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("AppAccess_callback_itself", (err)=>{ appAccountManager.deleteAccount("AppAccess_callback_itself", (err)=>{
console.debug("====>delete Account ActsAccountAppAccess_0100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAppAccess_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAppAccess_0100 end===="); console.debug("====>ActsAccountAppAccess_0100 end====");
done(); done();
}); });
...@@ -104,13 +104,13 @@ describe('ActsAccountAppAccess', function () { ...@@ -104,13 +104,13 @@ describe('ActsAccountAppAccess', function () {
var nonExistBundle = "com.example.NonExistentBundleCallback"; var nonExistBundle = "com.example.NonExistentBundleCallback";
appAccountManager.addAccount("AppAccess_callback_NotExistBundle", "extrainfo_callback_NotExistBundle", (err)=>{ appAccountManager.addAccount("AppAccess_callback_NotExistBundle", "extrainfo_callback_NotExistBundle", (err)=>{
console.debug("====>add account ActsAccountAppAccess_0300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAppAccess_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.enableAppAccess("AppAccess_callback_NotExistBundle", nonExistBundle, (err)=>{ appAccountManager.enableAppAccess("AppAccess_callback_NotExistBundle", nonExistBundle, (err)=>{
console.debug("====>enableAppAccess 0300 err:" + JSON.stringify(err)); console.debug("====>enableAppAccess 0300 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("AppAccess_callback_NotExistBundle", (err)=>{ appAccountManager.deleteAccount("AppAccess_callback_NotExistBundle", (err)=>{
console.debug("====>delete Account ActsAccountAppAccess_0300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAppAccess_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAppAccess_0300 end===="); console.debug("====>ActsAccountAppAccess_0300 end====");
done(); done();
}); });
...@@ -198,16 +198,16 @@ describe('ActsAccountAppAccess', function () { ...@@ -198,16 +198,16 @@ describe('ActsAccountAppAccess', function () {
var enableBundle = "com.example.actsaccountsceneappaccess"; var enableBundle = "com.example.actsaccountsceneappaccess";
appAccountManager.addAccount("AppAccess_callback_account", (err)=>{ appAccountManager.addAccount("AppAccess_callback_account", (err)=>{
console.debug("====>add account ActsAccountAppAccess_0700 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAppAccess_0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.enableAppAccess("AppAccess_callback_account", enableBundle, (err)=>{ appAccountManager.enableAppAccess("AppAccess_callback_account", enableBundle, (err)=>{
console.debug("====>enableAppAccess 0700 err:" + JSON.stringify(err)); console.debug("====>enableAppAccess 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.disableAppAccess("AppAccess_callback_account", enableBundle, (err)=>{ appAccountManager.disableAppAccess("AppAccess_callback_account", enableBundle, (err)=>{
console.debug("====>disableAppAccess 0700 err:" + JSON.stringify(err)); console.debug("====>disableAppAccess 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined) expect(err).assertEqual(null)
appAccountManager.deleteAccount("AppAccess_callback_account", (err)=>{ appAccountManager.deleteAccount("AppAccess_callback_account", (err)=>{
console.debug("====>delete Account ActsAccountAppAccess_0700 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAppAccess_0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAppAccess_0700 end===="); console.debug("====>ActsAccountAppAccess_0700 end====");
done(); done();
}); });
...@@ -315,13 +315,13 @@ describe('ActsAccountAppAccess', function () { ...@@ -315,13 +315,13 @@ describe('ActsAccountAppAccess', function () {
} }
appAccountManager.addAccount("AppAccess_callback_bigBundleName", (err)=>{ appAccountManager.addAccount("AppAccess_callback_bigBundleName", (err)=>{
console.debug("====>add account ActsAccountAppAccess_1100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAppAccess_1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.enableAppAccess("AppAccess_callback_bigBundleName", bigBundleName, (err)=>{ appAccountManager.enableAppAccess("AppAccess_callback_bigBundleName", bigBundleName, (err)=>{
console.debug("====>enableAppAccess 1100 err:" + JSON.stringify(err)); console.debug("====>enableAppAccess 1100 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("AppAccess_callback_bigBundleName", (err)=>{ appAccountManager.deleteAccount("AppAccess_callback_bigBundleName", (err)=>{
console.debug("====>delete Account ActsAccountAppAccess_1100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAppAccess_1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAppAccess_1100 end===="); console.debug("====>ActsAccountAppAccess_1100 end====");
done(); done();
}); });
...@@ -370,13 +370,13 @@ describe('ActsAccountAppAccess', function () { ...@@ -370,13 +370,13 @@ describe('ActsAccountAppAccess', function () {
var emptyBundleName = ''; var emptyBundleName = '';
appAccountManager.addAccount("AppAccess_callback_emptyBundleName", (err)=>{ appAccountManager.addAccount("AppAccess_callback_emptyBundleName", (err)=>{
console.debug("====>add account ActsAccountAppAccess_1300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAppAccess_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.enableAppAccess("AppAccess_callback_emptyBundleName", emptyBundleName, (err)=>{ appAccountManager.enableAppAccess("AppAccess_callback_emptyBundleName", emptyBundleName, (err)=>{
console.debug("====>enableAppAccess 1300 err:" + JSON.stringify(err)); console.debug("====>enableAppAccess 1300 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("AppAccess_callback_emptyBundleName", (err)=>{ appAccountManager.deleteAccount("AppAccess_callback_emptyBundleName", (err)=>{
console.debug("====>delete Account ActsAccountAppAccess_1300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAppAccess_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAppAccess_1300 end===="); console.debug("====>ActsAccountAppAccess_1300 end====");
done(); done();
}); });
...@@ -422,12 +422,12 @@ describe('ActsAccountAppAccess', function () { ...@@ -422,12 +422,12 @@ describe('ActsAccountAppAccess', function () {
var enableBundle = "com.example.actsaccountsceneappaccess"; var enableBundle = "com.example.actsaccountsceneappaccess";
appAccountManager.addAccount("AppAccess_callback_account", (err)=>{ appAccountManager.addAccount("AppAccess_callback_account", (err)=>{
console.debug("====>add account ActsAccountAppAccess_1500 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAppAccess_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.disableAppAccess("AppAccess_callback_account", enableBundle, (err)=>{ appAccountManager.disableAppAccess("AppAccess_callback_account", enableBundle, (err)=>{
expect(err.code != 0).assertEqual(true) expect(err.code != 0).assertEqual(true)
appAccountManager.deleteAccount("AppAccess_callback_account", (err)=>{ appAccountManager.deleteAccount("AppAccess_callback_account", (err)=>{
console.debug("====>delete Account ActsAccountAppAccess_1500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAppAccess_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAppAccess_1500 end===="); console.debug("====>ActsAccountAppAccess_1500 end====");
done(); done();
}); });
...@@ -479,12 +479,12 @@ describe('ActsAccountAppAccess', function () { ...@@ -479,12 +479,12 @@ describe('ActsAccountAppAccess', function () {
var notExistBundle = "com.example.actsaccountnotexistbundle"; var notExistBundle = "com.example.actsaccountnotexistbundle";
appAccountManager.addAccount("AppAccess_callback_notExistBundle", (err)=>{ appAccountManager.addAccount("AppAccess_callback_notExistBundle", (err)=>{
console.debug("====>add account ActsAccountAppAccess_1700 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountAppAccess_1700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.disableAppAccess("AppAccess_callback_notExistBundle", notExistBundle, (err)=>{ appAccountManager.disableAppAccess("AppAccess_callback_notExistBundle", notExistBundle, (err)=>{
expect(err.code != 0).assertEqual(true) expect(err.code != 0).assertEqual(true)
appAccountManager.deleteAccount("AppAccess_callback_notExistBundle", (err)=>{ appAccountManager.deleteAccount("AppAccess_callback_notExistBundle", (err)=>{
console.debug("====>delete Account ActsAccountAppAccess_1700 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountAppAccess_1700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountAppAccess_1700 end===="); console.debug("====>ActsAccountAppAccess_1700 end====");
done(); done();
}); });
......
...@@ -47,10 +47,10 @@ describe('ActsCreatAppAccountManager', function () { ...@@ -47,10 +47,10 @@ describe('ActsCreatAppAccountManager', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("creatappaccount_name_first", (err)=>{ appAccountManager.addAccount("creatappaccount_name_first", (err)=>{
console.debug("====>add account ActsCreatAppAccountManager_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsCreatAppAccountManager_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManagerTwo.deleteAccount("creatappaccount_name_first", (err)=>{ appAccountManagerTwo.deleteAccount("creatappaccount_name_first", (err)=>{
console.debug("====>delete Account ActsCreatAppAccountManager_0100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsCreatAppAccountManager_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsCreatAppAccountManager_0100 end===="); console.debug("====>ActsCreatAppAccountManager_0100 end====");
done(); done();
}); });
...@@ -71,18 +71,18 @@ describe('ActsCreatAppAccountManager', function () { ...@@ -71,18 +71,18 @@ describe('ActsCreatAppAccountManager', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("creatappaccount_name_second", (err)=>{ appAccountManager.addAccount("creatappaccount_name_second", (err)=>{
console.debug("====>add account ActsCreatAppAccountManager_0200 err:" + JSON.stringify(err)); console.debug("====>add account ActsCreatAppAccountManager_0200 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManagerTwo.setAccountExtraInfo("creatappaccount_name_second", "creatappaccount_extra", (err)=>{ appAccountManagerTwo.setAccountExtraInfo("creatappaccount_name_second", "creatappaccount_extra", (err)=>{
console.debug("====>setAccountExtraInfo err:" + JSON.stringify(err)); console.debug("====>setAccountExtraInfo err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountExtraInfo("creatappaccount_name_second", (err, data)=>{ appAccountManager.getAccountExtraInfo("creatappaccount_name_second", (err, data)=>{
console.debug("====>getAccountExtraInfo err:" + JSON.stringify(err)); console.debug("====>getAccountExtraInfo err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo data:" + JSON.stringify(data)); console.debug("====>getAccountExtraInfo data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual("creatappaccount_extra"); expect(data).assertEqual("creatappaccount_extra");
appAccountManagerTwo.deleteAccount("creatappaccount_name_second", (err)=>{ appAccountManagerTwo.deleteAccount("creatappaccount_name_second", (err)=>{
console.debug("====>delete Account err:" + JSON.stringify(err)); console.debug("====>delete Account err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsCreatAppAccountManager_0200 end===="); console.debug("====>ActsCreatAppAccountManager_0200 end====");
done(); done();
}); });
......
...@@ -75,18 +75,18 @@ describe('ActsAccountCredential', function () { ...@@ -75,18 +75,18 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_0100", (err)=>{ appAccountManager.addAccount("account_name_0100", (err)=>{
console.debug("====>add account ActsAccountCredential_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_0100", "credentialType1", "credential1",(err)=>{ appAccountManager.setAccountCredential("account_name_0100", "credentialType1", "credential1",(err)=>{
console.debug("====>ActsAccountCredential_0100 setAccountCredential:" + JSON.stringify(err)); console.debug("====>ActsAccountCredential_0100 setAccountCredential:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountCredential("account_name_0100", "credentialType1", (err,data)=>{ appAccountManager.getAccountCredential("account_name_0100", "credentialType1", (err,data)=>{
console.debug("====>getAccountCredential 0100 err:" + JSON.stringify(err)); console.debug("====>getAccountCredential 0100 err:" + JSON.stringify(err));
console.debug("====>getAccountCredential 0100 data:" + JSON.stringify(data)); console.debug("====>getAccountCredential 0100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual("credential1"); expect(data).assertEqual("credential1");
appAccountManager.deleteAccount("account_name_0100", (err)=>{ appAccountManager.deleteAccount("account_name_0100", (err)=>{
console.debug("====>delete Account 0100 err:" + JSON.stringify(err)); console.debug("====>delete Account 0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_0100 end===="); console.debug("====>ActsAccountCredential_0100 end====");
done(); done();
}); });
...@@ -146,21 +146,21 @@ describe('ActsAccountCredential', function () { ...@@ -146,21 +146,21 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_0300",(err)=>{ appAccountManager.addAccount("account_name_0300",(err)=>{
console.debug("====>add account ActsAccountCredential_0300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_0300", "credentialType3", "credential3",(err)=>{ appAccountManager.setAccountCredential("account_name_0300", "credentialType3", "credential3",(err)=>{
console.debug("====>setAccountCredential first time 0300 err:" + JSON.stringify(err)); console.debug("====>setAccountCredential first time 0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_0300", "credentialType3", "newcredential3",(err)=>{ appAccountManager.setAccountCredential("account_name_0300", "credentialType3", "newcredential3",(err)=>{
console.debug("====>setAccountCredential second time 0300 err:" + JSON.stringify(err)); console.debug("====>setAccountCredential second time 0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountCredential("account_name_0300", "credentialType3", (err, data)=>{ appAccountManager.getAccountCredential("account_name_0300", "credentialType3", (err, data)=>{
console.debug("====>getAccountCredential 0300 err:" + JSON.stringify(err)); console.debug("====>getAccountCredential 0300 err:" + JSON.stringify(err));
console.debug("====>getAccountCredential 0300 data:" + JSON.stringify(data)); console.debug("====>getAccountCredential 0300 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual("newcredential3"); expect(data).assertEqual("newcredential3");
appAccountManager.deleteAccount("account_name_0300", (err)=>{ appAccountManager.deleteAccount("account_name_0300", (err)=>{
console.debug("====>delete Account 0300 err:" + JSON.stringify(err)); console.debug("====>delete Account 0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_0300 end===="); console.debug("====>ActsAccountCredential_0300 end====");
done(); done();
}); });
...@@ -219,18 +219,18 @@ describe('ActsAccountCredential', function () { ...@@ -219,18 +219,18 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_0500",(err)=>{ appAccountManager.addAccount("account_name_0500",(err)=>{
console.debug("====>add account ActsAccountCredential_0500 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_0500", "credentialType5", "", (err)=>{ appAccountManager.setAccountCredential("account_name_0500", "credentialType5", "", (err)=>{
console.debug("====>setAccountCredential ActsAccountCredential_0500 err:" + JSON.stringify(err)); console.debug("====>setAccountCredential ActsAccountCredential_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountCredential("account_name_0500", "credentialType5", (err,data)=>{ appAccountManager.getAccountCredential("account_name_0500", "credentialType5", (err,data)=>{
console.debug("====>getAccountCredential ActsAccountCredential_0500 err:" + JSON.stringify(err)); console.debug("====>getAccountCredential ActsAccountCredential_0500 err:" + JSON.stringify(err));
console.debug("====>getAccountCredential ActsAccountCredential_0500 data:" + JSON.stringify(data)); console.debug("====>getAccountCredential ActsAccountCredential_0500 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(""); expect(data).assertEqual("");
appAccountManager.deleteAccount("account_name_0500", (err)=>{ appAccountManager.deleteAccount("account_name_0500", (err)=>{
console.debug("====>delete Account ActsAccountCredential_0500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_0500 end===="); console.debug("====>ActsAccountCredential_0500 end====");
done(); done();
}); });
...@@ -273,13 +273,13 @@ describe('ActsAccountCredential', function () { ...@@ -273,13 +273,13 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_0700", (err)=>{ appAccountManager.addAccount("account_name_0700", (err)=>{
console.debug("====>add account ActsAccountCredential_0700 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_0700", "", "credential7", (err)=>{ appAccountManager.setAccountCredential("account_name_0700", "", "credential7", (err)=>{
console.debug("====>setAccountCredential ActsAccountCredential_0700 err:" + JSON.stringify(err)); console.debug("====>setAccountCredential ActsAccountCredential_0700 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_0700", (err)=>{ appAccountManager.deleteAccount("account_name_0700", (err)=>{
console.debug("====>delete Account ActsAccountCredential_0700 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_0700 end===="); console.debug("====>ActsAccountCredential_0700 end====");
done(); done();
}); });
...@@ -322,13 +322,13 @@ describe('ActsAccountCredential', function () { ...@@ -322,13 +322,13 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_0900", (err)=>{ appAccountManager.addAccount("account_name_0900", (err)=>{
console.debug("====>add account ActsAccountCredential_0900 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountCredential("account_name_0900", "", (err)=>{ appAccountManager.getAccountCredential("account_name_0900", "", (err)=>{
console.debug("====>getAccountCredential ActsAccountCredential_0900 err:" + JSON.stringify(err)); console.debug("====>getAccountCredential ActsAccountCredential_0900 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_0900", (err)=>{ appAccountManager.deleteAccount("account_name_0900", (err)=>{
console.debug("====>delete Account ActsAccountCredential_0900 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_0900 end===="); console.debug("====>ActsAccountCredential_0900 end====");
done(); done();
}); });
...@@ -372,18 +372,18 @@ describe('ActsAccountCredential', function () { ...@@ -372,18 +372,18 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_1100",(err)=>{ appAccountManager.addAccount("account_name_1100",(err)=>{
console.debug("====>add account ActsAccountCredential_1100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_1100", " ", "credential11",(err)=>{ appAccountManager.setAccountCredential("account_name_1100", " ", "credential11",(err)=>{
console.debug("====>setAccountCredential ActsAccountCredential_1100 err:" + JSON.stringify(err)); console.debug("====>setAccountCredential ActsAccountCredential_1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountCredential("account_name_1100", " ", (err, data)=>{ appAccountManager.getAccountCredential("account_name_1100", " ", (err, data)=>{
console.debug("====>getAccountCredential 1100 err:" + JSON.stringify(err)); console.debug("====>getAccountCredential 1100 err:" + JSON.stringify(err));
console.debug("====>getAccountCredential 1100 data:" + JSON.stringify(data)); console.debug("====>getAccountCredential 1100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual("credential11"); expect(data).assertEqual("credential11");
appAccountManager.deleteAccount("account_name_1100", (err)=>{ appAccountManager.deleteAccount("account_name_1100", (err)=>{
console.debug("====>delete Account 1100 err:" + JSON.stringify(err)); console.debug("====>delete Account 1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_1100 end===="); console.debug("====>ActsAccountCredential_1100 end====");
done(); done();
}); });
...@@ -427,13 +427,13 @@ describe('ActsAccountCredential', function () { ...@@ -427,13 +427,13 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_1300",(err)=>{ appAccountManager.addAccount("account_name_1300",(err)=>{
console.debug("====>add account ActsAccountCredential_1300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("", "credentialType13", "credential13", (err)=>{ appAccountManager.setAccountCredential("", "credentialType13", "credential13", (err)=>{
console.debug("====>setAccountCredential ActsAccountCredential_1300 err:" + JSON.stringify(err)); console.debug("====>setAccountCredential ActsAccountCredential_1300 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_1300", (err)=>{ appAccountManager.deleteAccount("account_name_1300", (err)=>{
console.debug("====>delete Account ActsAccountCredential_1300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_1300 end===="); console.debug("====>ActsAccountCredential_1300 end====");
done(); done();
}); });
...@@ -476,13 +476,13 @@ describe('ActsAccountCredential', function () { ...@@ -476,13 +476,13 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_1500", (err)=>{ appAccountManager.addAccount("account_name_1500", (err)=>{
console.debug("====>add account ActsAccountCredential_1500 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountCredential("account_name_1500", "credentialType15", (err)=>{ appAccountManager.getAccountCredential("account_name_1500", "credentialType15", (err)=>{
console.debug("====>getAccountCredential ActsAccountCredential_1500 err:" + JSON.stringify(err)); console.debug("====>getAccountCredential ActsAccountCredential_1500 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_1500", (err)=>{ appAccountManager.deleteAccount("account_name_1500", (err)=>{
console.debug("====>delete Account ActsAccountCredential_1500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_1500 end===="); console.debug("====>ActsAccountCredential_1500 end====");
done(); done();
}); });
...@@ -528,7 +528,7 @@ describe('ActsAccountCredential', function () { ...@@ -528,7 +528,7 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_1700", (err)=>{ appAccountManager.addAccount("account_name_1700", (err)=>{
console.debug("====>add account ActsAccountCredential_1700 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_1700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_1700", "credentialType17", CREDENTIALOVERSIZE, (err)=>{ appAccountManager.setAccountCredential("account_name_1700", "credentialType17", CREDENTIALOVERSIZE, (err)=>{
console.debug("====>CREDENTIALOVERSIZE.length:" + JSON.stringify(CREDENTIALOVERSIZE.length)); console.debug("====>CREDENTIALOVERSIZE.length:" + JSON.stringify(CREDENTIALOVERSIZE.length));
expect(CREDENTIALOVERSIZE.length).assertEqual(1025); expect(CREDENTIALOVERSIZE.length).assertEqual(1025);
...@@ -536,7 +536,7 @@ describe('ActsAccountCredential', function () { ...@@ -536,7 +536,7 @@ describe('ActsAccountCredential', function () {
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_1700", (err)=>{ appAccountManager.deleteAccount("account_name_1700", (err)=>{
console.debug("====>delete Account ActsAccountCredential_1700 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_1700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_1700 end===="); console.debug("====>ActsAccountCredential_1700 end====");
done(); done();
}); });
...@@ -587,7 +587,7 @@ describe('ActsAccountCredential', function () { ...@@ -587,7 +587,7 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_1900", (err)=>{ appAccountManager.addAccount("account_name_1900", (err)=>{
console.debug("====>add account ActsAccountCredential_1900 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_1900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential("account_name_1900", CREDENTIALTYPEOVERSIZE, "credential19", (err)=>{ appAccountManager.setAccountCredential("account_name_1900", CREDENTIALTYPEOVERSIZE, "credential19", (err)=>{
console.debug("====>CREDENTIALTYPEOVERSIZE.length:" + JSON.stringify(CREDENTIALTYPEOVERSIZE.length)); console.debug("====>CREDENTIALTYPEOVERSIZE.length:" + JSON.stringify(CREDENTIALTYPEOVERSIZE.length));
expect(CREDENTIALTYPEOVERSIZE.length).assertEqual(1025); expect(CREDENTIALTYPEOVERSIZE.length).assertEqual(1025);
...@@ -595,7 +595,7 @@ describe('ActsAccountCredential', function () { ...@@ -595,7 +595,7 @@ describe('ActsAccountCredential', function () {
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_1900", (err)=>{ appAccountManager.deleteAccount("account_name_1900", (err)=>{
console.debug("====>delete Account ActsAccountCredential_1900 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_1900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCredential_1900 end===="); console.debug("====>ActsAccountCredential_1900 end====");
done(); done();
}); });
...@@ -646,14 +646,14 @@ describe('ActsAccountCredential', function () { ...@@ -646,14 +646,14 @@ describe('ActsAccountCredential', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_2100", (err)=>{ appAccountManager.addAccount("account_name_2100", (err)=>{
console.debug("====>add account ActsAccountCredential_2100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountCredential_2100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential(NAMEOVERSIZE, "credentialType21", "credential21", (err)=>{ appAccountManager.setAccountCredential(NAMEOVERSIZE, "credentialType21", "credential21", (err)=>{
console.debug("====>setAccountCredential ActsAccountCredential_2100 err:" + JSON.stringify(err)); console.debug("====>setAccountCredential ActsAccountCredential_2100 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
appAccountManager.deleteAccount("account_name_2100", (err)=>{ appAccountManager.deleteAccount("account_name_2100", (err)=>{
console.debug("====>delete Account ActsAccountCredential_2100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountCredential_2100 err:" + JSON.stringify(err));
console.debug("====>ActsAccountCredential_2100 end===="); console.debug("====>ActsAccountCredential_2100 end====");
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
done(); done();
}); });
}); });
......
...@@ -46,10 +46,10 @@ describe('ActsAccountDeleteAccount', function () { ...@@ -46,10 +46,10 @@ describe('ActsAccountDeleteAccount', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("deleteAccount_name_callback_first", "extraInfo_callback_first", (err)=>{ appAccountManager.addAccount("deleteAccount_name_callback_first", "extraInfo_callback_first", (err)=>{
console.debug("====>add account ActsAccountDeleteAccount_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountDeleteAccount_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("deleteAccount_name_callback_first", (err)=>{ appAccountManager.deleteAccount("deleteAccount_name_callback_first", (err)=>{
console.debug("====>delete Account ActsAccountDeleteAccount_0100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountDeleteAccount_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountDeleteAccount_0100 end===="); console.debug("====>ActsAccountDeleteAccount_0100 end====");
done(); done();
}); });
...@@ -124,10 +124,10 @@ describe('ActsAccountDeleteAccount', function () { ...@@ -124,10 +124,10 @@ describe('ActsAccountDeleteAccount', function () {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount("deleteAccount_name_callback_third", "extraInfo_callback_third", (err)=>{ appAccountManager.addAccount("deleteAccount_name_callback_third", "extraInfo_callback_third", (err)=>{
console.debug("====>add account ActsAccountDeleteAccount_0500 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountDeleteAccount_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("deleteAccount_name_callback_third", (err)=>{ appAccountManager.deleteAccount("deleteAccount_name_callback_third", (err)=>{
console.debug("====>delete account first time err:" + JSON.stringify(err)); console.debug("====>delete account first time err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("deleteAccount_name_callback_third", (err)=>{ appAccountManager.deleteAccount("deleteAccount_name_callback_third", (err)=>{
console.debug("====>delete Account second time err:" + JSON.stringify(err)); console.debug("====>delete Account second time err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true); expect(err.code != 0).assertEqual(true);
......
...@@ -53,15 +53,15 @@ describe('ActsAccountSetGetExtraInfo', function () { ...@@ -53,15 +53,15 @@ describe('ActsAccountSetGetExtraInfo', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_first", extraInfoStr, (err)=>{ appAccountManager.addAccount("account_name_callback_first", extraInfoStr, (err)=>{
console.debug("====>add account ActsAccountSetGetExtraInfo_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountSetGetExtraInfo_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountExtraInfo("account_name_callback_first", (err, data)=>{ appAccountManager.getAccountExtraInfo("account_name_callback_first", (err, data)=>{
console.debug("====>getAccountExtraInfo 0100 err:" + JSON.stringify(err)); console.debug("====>getAccountExtraInfo 0100 err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo 0100 data:" + JSON.stringify(data)); console.debug("====>getAccountExtraInfo 0100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(extraInfoStr); expect(data).assertEqual(extraInfoStr);
appAccountManager.deleteAccount("account_name_callback_first", (err)=>{ appAccountManager.deleteAccount("account_name_callback_first", (err)=>{
console.debug("====>delete Account 0100 err:" + JSON.stringify(err)); console.debug("====>delete Account 0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountSetGetExtraInfo_0100 end===="); console.debug("====>ActsAccountSetGetExtraInfo_0100 end====");
done(); done();
}); });
...@@ -150,10 +150,10 @@ describe('ActsAccountSetGetExtraInfo', function () { ...@@ -150,10 +150,10 @@ describe('ActsAccountSetGetExtraInfo', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_third", "account_extrainfo_callback_third", (err)=>{ appAccountManager.addAccount("account_name_callback_third", "account_extrainfo_callback_third", (err)=>{
console.debug("====>add account ActsAccountSetGetExtraInfo_0500 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountSetGetExtraInfo_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("account_name_callback_third", (err)=>{ appAccountManager.deleteAccount("account_name_callback_third", (err)=>{
console.debug("====>delete Account 0500 err:" + JSON.stringify(err)); console.debug("====>delete Account 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountExtraInfo("account_name_callback_third", (err, data)=>{ appAccountManager.getAccountExtraInfo("account_name_callback_third", (err, data)=>{
console.debug("====>getAccountExtraInfo 0500 err:" + JSON.stringify(err)); console.debug("====>getAccountExtraInfo 0500 err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo 0500 data:" + JSON.stringify(data)); console.debug("====>getAccountExtraInfo 0500 data:" + JSON.stringify(data));
...@@ -203,15 +203,15 @@ describe('ActsAccountSetGetExtraInfo', function () { ...@@ -203,15 +203,15 @@ describe('ActsAccountSetGetExtraInfo', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_fourth", (err)=>{ appAccountManager.addAccount("account_name_callback_fourth", (err)=>{
console.debug("====>add account ActsAccountSetGetExtraInfo_0700 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountSetGetExtraInfo_0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountExtraInfo("account_name_callback_fourth", (err, data)=>{ appAccountManager.getAccountExtraInfo("account_name_callback_fourth", (err, data)=>{
console.debug("====>getAccountExtraInfo 0700 err:" + JSON.stringify(err)); console.debug("====>getAccountExtraInfo 0700 err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo 0700 data:" + JSON.stringify(data)); console.debug("====>getAccountExtraInfo 0700 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(""); expect(data).assertEqual("");
appAccountManager.deleteAccount("account_name_callback_fourth", (err)=>{ appAccountManager.deleteAccount("account_name_callback_fourth", (err)=>{
console.debug("====>delete Account 0700 err:" + JSON.stringify(err)); console.debug("====>delete Account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountSetGetExtraInfo_0700 end===="); console.debug("====>ActsAccountSetGetExtraInfo_0700 end====");
done(); done();
}); });
...@@ -300,18 +300,18 @@ describe('ActsAccountSetGetExtraInfo', function () { ...@@ -300,18 +300,18 @@ describe('ActsAccountSetGetExtraInfo', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_sixth", "account_extrainfo_callback_sixth",(err)=>{ appAccountManager.addAccount("account_name_callback_sixth", "account_extrainfo_callback_sixth",(err)=>{
console.debug("====>add account ActsAccountSetGetExtraInfo_1100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountSetGetExtraInfo_1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountExtraInfo("account_name_callback_sixth", "account_extra_sixth_twice", (err)=>{ appAccountManager.setAccountExtraInfo("account_name_callback_sixth", "account_extra_sixth_twice", (err)=>{
console.debug("====>setAccountExtraInfo 1100 err:" + JSON.stringify(err)); console.debug("====>setAccountExtraInfo 1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountExtraInfo("account_name_callback_sixth", (err, data)=>{ appAccountManager.getAccountExtraInfo("account_name_callback_sixth", (err, data)=>{
console.debug("====>getAccountExtraInfo 1100 err:" + JSON.stringify(err)); console.debug("====>getAccountExtraInfo 1100 err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo 1100 data:" + JSON.stringify(data)); console.debug("====>getAccountExtraInfo 1100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual("account_extra_sixth_twice"); expect(data).assertEqual("account_extra_sixth_twice");
appAccountManager.deleteAccount("account_name_callback_sixth", (err)=>{ appAccountManager.deleteAccount("account_name_callback_sixth", (err)=>{
console.debug("====>delete Account 1100 err:" + JSON.stringify(err)); console.debug("====>delete Account 1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountSetGetExtraInfo_1100 end===="); console.debug("====>ActsAccountSetGetExtraInfo_1100 end====");
done(); done();
}); });
...@@ -360,17 +360,17 @@ describe('ActsAccountSetGetExtraInfo', function () { ...@@ -360,17 +360,17 @@ describe('ActsAccountSetGetExtraInfo', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_seventh",(err)=>{ appAccountManager.addAccount("account_name_callback_seventh",(err)=>{
console.debug("====>add account ActsAccountSetGetExtraInfo_1300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountSetGetExtraInfo_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountExtraInfo("account_name_callback_seventh", "callback_seventh", (err)=>{ appAccountManager.setAccountExtraInfo("account_name_callback_seventh", "callback_seventh", (err)=>{
console.debug("====>setAccountExtraInfo 1300 first time err:" + JSON.stringify(err)); console.debug("====>setAccountExtraInfo 1300 first time err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountExtraInfo("account_name_callback_seventh", "call_seventh_twice", (err)=>{ appAccountManager.setAccountExtraInfo("account_name_callback_seventh", "call_seventh_twice", (err)=>{
console.debug("====>setAccountExtraInfo 1300 second time err:" + JSON.stringify(err)); console.debug("====>setAccountExtraInfo 1300 second time err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountExtraInfo("account_name_callback_seventh", (err, data)=>{ appAccountManager.getAccountExtraInfo("account_name_callback_seventh", (err, data)=>{
console.debug("====>getAccountExtraInfo 1300 err:" + JSON.stringify(err)); console.debug("====>getAccountExtraInfo 1300 err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo 1300 data:" + JSON.stringify(data)); console.debug("====>getAccountExtraInfo 1300 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual("call_seventh_twice"); expect(data).assertEqual("call_seventh_twice");
appAccountManager.deleteAccount("account_name_callback_seventh", (err)=>{ appAccountManager.deleteAccount("account_name_callback_seventh", (err)=>{
console.debug("====>delete Account 1300 err:" + JSON.stringify(err)); console.debug("====>delete Account 1300 err:" + JSON.stringify(err));
...@@ -436,17 +436,17 @@ describe('ActsAccountSetGetExtraInfo', function () { ...@@ -436,17 +436,17 @@ describe('ActsAccountSetGetExtraInfo', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("account_name_callback_eighth",(err)=>{ appAccountManager.addAccount("account_name_callback_eighth",(err)=>{
console.debug("====>add account ActsAccountSetGetExtraInfo_1500 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountSetGetExtraInfo_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountExtraInfo("account_name_callback_eighth", "extra_callback_eighth", (err)=>{ appAccountManager.setAccountExtraInfo("account_name_callback_eighth", "extra_callback_eighth", (err)=>{
console.debug("====>setAccountExtraInfo second time err:" + JSON.stringify(err)); console.debug("====>setAccountExtraInfo second time err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountExtraInfo("account_name_callback_eighth", "extra_callback_eighth", (err)=>{ appAccountManager.setAccountExtraInfo("account_name_callback_eighth", "extra_callback_eighth", (err)=>{
console.debug("====>setAccountExtraInfo 1500 first time err:" + JSON.stringify(err)); console.debug("====>setAccountExtraInfo 1500 first time err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAccountExtraInfo("account_name_callback_eighth", (err, data)=>{ appAccountManager.getAccountExtraInfo("account_name_callback_eighth", (err, data)=>{
console.debug("====>getAccountExtraInfo 1500 err:" + JSON.stringify(err)); console.debug("====>getAccountExtraInfo 1500 err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo 1500 data:" + JSON.stringify(data)); console.debug("====>getAccountExtraInfo 1500 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual("extra_callback_eighth"); expect(data).assertEqual("extra_callback_eighth");
appAccountManager.deleteAccount("account_name_callback_eighth", (err)=>{ appAccountManager.deleteAccount("account_name_callback_eighth", (err)=>{
console.debug("====>delete Account 1500 err:" + JSON.stringify(err)); console.debug("====>delete Account 1500 err:" + JSON.stringify(err));
......
...@@ -45,13 +45,13 @@ describe('ActsAccountNoPermission', function () { ...@@ -45,13 +45,13 @@ describe('ActsAccountNoPermission', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_setnopermission", (err)=>{ appAccountManager.addAccount("syncenable_callback_setnopermission", (err)=>{
console.debug("====>add account ActsAccountNoPermission_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountNoPermission_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_setnopermission", true, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_setnopermission", true, (err)=>{
console.debug("====>setAppAccountSyncEnable 0100 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable 0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED); expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("syncenable_callback_setnopermission", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_setnopermission", (err)=>{
console.debug("====>delete Account ActsAccountNoPermission_0100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountNoPermission_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountNoPermission_0100 end===="); console.debug("====>ActsAccountNoPermission_0100 end====");
done(); done();
}); });
...@@ -95,13 +95,13 @@ describe('ActsAccountNoPermission', function () { ...@@ -95,13 +95,13 @@ describe('ActsAccountNoPermission', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_checknopermission", (err)=>{ appAccountManager.addAccount("syncenable_callback_checknopermission", (err)=>{
console.debug("====>add account ActsAccountNoPermission_0300 err:" + JSON.stringify(err)); console.debug("====>add account ActsAccountNoPermission_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_checknopermission", (err, data)=>{ appAccountManager.checkAppAccountSyncEnable("syncenable_callback_checknopermission", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 0300 err:" + JSON.stringify(err)); console.debug("====>checkAppAccountSyncEnable 0300 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED); expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("syncenable_callback_checknopermission", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_checknopermission", (err)=>{
console.debug("====>delete Account ActsAccountNoPermission_0300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountNoPermission_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountNoPermission_0300 end===="); console.debug("====>ActsAccountNoPermission_0300 end====");
done(); done();
}); });
...@@ -144,13 +144,13 @@ describe('ActsAccountNoPermission', function () { ...@@ -144,13 +144,13 @@ describe('ActsAccountNoPermission', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("accessibleAccount_callback_nopermission", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_nopermission", (err)=>{
console.debug("====> add account ActsAccountNoPermission_0500 err:" + JSON.stringify(err)); console.debug("====> add account ActsAccountNoPermission_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccessibleAccounts((err, data)=>{ appAccountManager.getAllAccessibleAccounts((err, data)=>{
console.debug("====>getAllAccessibleAccounts 0500 err:" + JSON.stringify(err)); console.debug("====>getAllAccessibleAccounts 0500 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED); expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("accessibleAccount_callback_nopermission", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_nopermission", (err)=>{
console.debug("====>delete Account ActsAccountNoPermission_0500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountNoPermission_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountNoPermission_0500 end===="); console.debug("====>ActsAccountNoPermission_0500 end====");
done(); done();
}) })
...@@ -194,13 +194,13 @@ describe('ActsAccountNoPermission', function () { ...@@ -194,13 +194,13 @@ describe('ActsAccountNoPermission', function () {
var selfBundle = "com.example.actsaccounttest"; var selfBundle = "com.example.actsaccounttest";
appAccountManager.addAccount("getAll_callback_nopermission", (err)=>{ appAccountManager.addAccount("getAll_callback_nopermission", (err)=>{
console.debug("====>add account 0700 err:" + JSON.stringify(err)); console.debug("====>add account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 0700 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 0700 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED); expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("getAll_callback_nopermission", (err)=>{ appAccountManager.deleteAccount("getAll_callback_nopermission", (err)=>{
console.debug("====>delete account 0700 err:" + JSON.stringify(err)); console.debug("====>delete account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountNoPermission_0700 end===="); console.debug("====>ActsAccountNoPermission_0700 end====");
done(); done();
}); });
......
...@@ -67,12 +67,12 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -67,12 +67,12 @@ describe('ActsAccountChangeOnOff', async function () {
} }
function deleteAccountCallback(err){ function deleteAccountCallback(err){
console.debug("====>delete account 0100 err:" + JSON.stringify(err)); console.debug("====>delete account 0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
done(); done();
} }
function disCallback(err){ function disCallback(err){
console.debug("====>delete account 0100 err:" + JSON.stringify(err)); console.debug("====>delete account 0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("changeonoff_extra", deleteAccountCallback); appAccountManager.deleteAccount("changeonoff_extra", deleteAccountCallback);
} }
function subscriberCallback(err, data){ function subscriberCallback(err, data){
...@@ -135,7 +135,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -135,7 +135,7 @@ describe('ActsAccountChangeOnOff', async function () {
} }
function deleteAccountCallback(err){ function deleteAccountCallback(err){
console.debug("====>delete account 0200 err:" + JSON.stringify(err)); console.debug("====>delete account 0200 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
done(); done();
} }
function subscriberCallback(err, data){ function subscriberCallback(err, data){
...@@ -198,7 +198,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -198,7 +198,7 @@ describe('ActsAccountChangeOnOff', async function () {
} }
function deleteAccountCallback(err){ function deleteAccountCallback(err){
console.debug("====>delete account 0300 err:" + JSON.stringify(err)); console.debug("====>delete account 0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
done(); done();
} }
function subscriberCallback(err, data){ function subscriberCallback(err, data){
...@@ -265,7 +265,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -265,7 +265,7 @@ describe('ActsAccountChangeOnOff', async function () {
} }
function deleteAccountCallback(err){ function deleteAccountCallback(err){
console.debug("====>delete account 0400 err:" + JSON.stringify(err)); console.debug("====>delete account 0400 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
done(); done();
} }
function subscriberCallback(err, data){ function subscriberCallback(err, data){
...@@ -325,14 +325,13 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -325,14 +325,13 @@ describe('ActsAccountChangeOnOff', async function () {
await appAccountManager.enableAppAccess("onoff_delete", "com.example.actsaccountsceneonoff"); await appAccountManager.enableAppAccess("onoff_delete", "com.example.actsaccountsceneonoff");
function unSubscriberCallback(err){ function unSubscriberCallback(err){
console.debug("====>unsubscribe 0500 err:" + JSON.stringify(err)); console.debug("====>unsubscribe 0500 err:" + JSON.stringify(err));
expect(err.code==0).assertEqual(true);
done();
} }
function subscriberCallback(err, data){ function subscriberCallback(err, data){
console.debug("====>subscriberCallback 0500 data:" + JSON.stringify(data)); console.debug("====>subscriberCallback 0500 data:" + JSON.stringify(data));
expect(data.event).assertEqual("account_on_change_delete"); expect(data.event).assertEqual("account_on_change_delete");
expect(data.data).assertEqual("SUCCESS"); expect(data.data).assertEqual("SUCCESS");
commonevent.unsubscribe(subscriber, unSubscriberCallback); commonevent.unsubscribe(subscriber, unSubscriberCallback);
done();
} }
function publishCallback(err){ function publishCallback(err){
console.debug("====>publish call back err:" + JSON.stringify(err)); console.debug("====>publish call back err:" + JSON.stringify(err));
...@@ -391,10 +390,10 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -391,10 +390,10 @@ describe('ActsAccountChangeOnOff', async function () {
} }
function deleteAccountCallback(err){ function deleteAccountCallback(err){
console.debug("====>delete first account 0600 err:" + JSON.stringify(err)); console.debug("====>delete first account 0600 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("onoff_enableSec", (err)=>{ appAccountManager.deleteAccount("onoff_enableSec", (err)=>{
console.debug("====>delete second account 0600 err:" + JSON.stringify(err)); console.debug("====>delete second account 0600 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
done(); done();
}); });
} }
...@@ -458,7 +457,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -458,7 +457,7 @@ describe('ActsAccountChangeOnOff', async function () {
} }
function deleteAccountCallback(err){ function deleteAccountCallback(err){
console.debug("====>delete account 0700 err:" + JSON.stringify(err)); console.debug("====>delete account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
done(); done();
} }
function subscriberCallback(err, data){ function subscriberCallback(err, data){
...@@ -531,7 +530,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -531,7 +530,7 @@ describe('ActsAccountChangeOnOff', async function () {
console.debug("====>off ActsAccountChangeOnOff_0800 finish===="); console.debug("====>off ActsAccountChangeOnOff_0800 finish====");
appAccountManager.deleteAccount("onoff_self", (err)=>{ appAccountManager.deleteAccount("onoff_self", (err)=>{
console.debug("====>delete account ActsAccountChangeOnOff_0800 err:" + JSON.stringify(err)); console.debug("====>delete account ActsAccountChangeOnOff_0800 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountChangeOnOff_0800 end===="); console.debug("====>ActsAccountChangeOnOff_0800 end====");
done(); done();
}); });
...@@ -594,10 +593,10 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -594,10 +593,10 @@ describe('ActsAccountChangeOnOff', async function () {
console.debug("====>off ActsAccountChangeOnOff_0900 finish===="); console.debug("====>off ActsAccountChangeOnOff_0900 finish====");
appAccountManager.deleteAccount("onoff_self_first", (err)=>{ appAccountManager.deleteAccount("onoff_self_first", (err)=>{
console.debug("====>delete first account 0900 err:" + JSON.stringify(err)); console.debug("====>delete first account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("onoff_self_second", (err)=>{ appAccountManager.deleteAccount("onoff_self_second", (err)=>{
console.debug("====>delete second account 0900 err:" + JSON.stringify(err)); console.debug("====>delete second account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountChangeOnOff_0900 end===="); console.debug("====>ActsAccountChangeOnOff_0900 end====");
done(); done();
}); });
...@@ -671,7 +670,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -671,7 +670,7 @@ describe('ActsAccountChangeOnOff', async function () {
console.debug("====>off ActsAccountChangeOnOff_1000 finish===="); console.debug("====>off ActsAccountChangeOnOff_1000 finish====");
appAccountManager.deleteAccount("onoff_twice", (err)=>{ appAccountManager.deleteAccount("onoff_twice", (err)=>{
console.debug("====>delete account ActsAccountChangeOnOff_1000 err:" + JSON.stringify(err)); console.debug("====>delete account ActsAccountChangeOnOff_1000 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(twiceSign).assertEqual(2); expect(twiceSign).assertEqual(2);
console.debug("====>ActsAccountChangeOnOff_1000 end===="); console.debug("====>ActsAccountChangeOnOff_1000 end====");
done(); done();
...@@ -752,7 +751,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -752,7 +751,7 @@ describe('ActsAccountChangeOnOff', async function () {
console.debug("====>off ActsAccountChangeOnOff_1100 finish===="); console.debug("====>off ActsAccountChangeOnOff_1100 finish====");
appAccountManager.deleteAccount("onoff_same", (err)=>{ appAccountManager.deleteAccount("onoff_same", (err)=>{
console.debug("====>delete account ActsAccountChangeOnOff_1100 err:" + JSON.stringify(err)); console.debug("====>delete account ActsAccountChangeOnOff_1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountChangeOnOff_1100 end===="); console.debug("====>ActsAccountChangeOnOff_1100 end====");
done(); done();
}); });
...@@ -793,7 +792,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -793,7 +792,7 @@ describe('ActsAccountChangeOnOff', async function () {
console.debug("====>delete account 1200 start===="); console.debug("====>delete account 1200 start====");
appAccountManager.deleteAccount("onoff_repeatoff", (err)=>{ appAccountManager.deleteAccount("onoff_repeatoff", (err)=>{
console.debug("====>delete account ActsAccountChangeOnOff_1200 err:" + JSON.stringify(err)); console.debug("====>delete account ActsAccountChangeOnOff_1200 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountChangeOnOff_1200 end===="); console.debug("====>ActsAccountChangeOnOff_1200 end====");
done(); done();
}); });
...@@ -860,7 +859,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -860,7 +859,7 @@ describe('ActsAccountChangeOnOff', async function () {
console.debug("====>delete account 1300 start===="); console.debug("====>delete account 1300 start====");
appAccountManager.deleteAccount("onoff_same", (err)=>{ appAccountManager.deleteAccount("onoff_same", (err)=>{
console.debug("====>delete account ActsAccountChangeOnOff_1300 err:" + JSON.stringify(err)); console.debug("====>delete account ActsAccountChangeOnOff_1300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountChangeOnOff_1300 end===="); console.debug("====>ActsAccountChangeOnOff_1300 end====");
done(); done();
}); });
...@@ -907,7 +906,7 @@ describe('ActsAccountChangeOnOff', async function () { ...@@ -907,7 +906,7 @@ describe('ActsAccountChangeOnOff', async function () {
console.debug("====>delete account 1400 start===="); console.debug("====>delete account 1400 start====");
appAccountManager.deleteAccount("onoff_same", (err)=>{ appAccountManager.deleteAccount("onoff_same", (err)=>{
console.debug("====>delete account ActsAccountChangeOnOff_1400 err:" + JSON.stringify(err)); console.debug("====>delete account ActsAccountChangeOnOff_1400 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountChangeOnOff_1400 end===="); console.debug("====>ActsAccountChangeOnOff_1400 end====");
done(); done();
}); });
......
...@@ -32,11 +32,11 @@ describe('ActsGetAllAccounts', function () { ...@@ -32,11 +32,11 @@ describe('ActsGetAllAccounts', function () {
var selfBundle = "com.example.actsgetallaaccounts"; var selfBundle = "com.example.actsgetallaaccounts";
appAccountManager.addAccount("Account_this_application_callback", (err)=>{ appAccountManager.addAccount("Account_this_application_callback", (err)=>{
console.debug("====>add account 0100 err:" + JSON.stringify(err)); console.debug("====>add account 0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 0100 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 0100 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 0100 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 0100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
try{ try{
expect(data[0].name).assertEqual("Account_this_application_callback"); expect(data[0].name).assertEqual("Account_this_application_callback");
expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts"); expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts");
...@@ -48,7 +48,7 @@ describe('ActsGetAllAccounts', function () { ...@@ -48,7 +48,7 @@ describe('ActsGetAllAccounts', function () {
} }
appAccountManager.deleteAccount("Account_this_application_callback", (err)=>{ appAccountManager.deleteAccount("Account_this_application_callback", (err)=>{
console.debug("====>delete account 0100 err:" + JSON.stringify(err)); console.debug("====>delete account 0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsGetAllAccounts_0100 end===="); console.debug("====>ActsGetAllAccounts_0100 end====");
done(); done();
}); });
...@@ -121,7 +121,7 @@ describe('ActsGetAllAccounts', function () { ...@@ -121,7 +121,7 @@ describe('ActsGetAllAccounts', function () {
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 0300 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 0300 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 0300 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 0300 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(0); expect(data.length).assertEqual(0);
console.debug("====>ActsGetAllAccounts_0300 end===="); console.debug("====>ActsGetAllAccounts_0300 end====");
done(); done();
...@@ -275,12 +275,12 @@ describe('ActsGetAllAccounts', function () { ...@@ -275,12 +275,12 @@ describe('ActsGetAllAccounts', function () {
function getAllCallback(err, data){ function getAllCallback(err, data){
console.debug("====>getAllAccounts 0900 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 0900 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 0900 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 0900 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data[0].name).assertEqual("Account_application_callback"); expect(data[0].name).assertEqual("Account_application_callback");
expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts"); expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts");
appAccountManager.deleteAccount("Account_application_callback", (err)=>{ appAccountManager.deleteAccount("Account_application_callback", (err)=>{
console.debug("====>delete account 0900 err:" + JSON.stringify(err)); console.debug("====>delete account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsGetAllAccounts_0900 end===="); console.debug("====>ActsGetAllAccounts_0900 end====");
done(); done();
}); });
...@@ -373,7 +373,7 @@ describe('ActsGetAllAccounts', function () { ...@@ -373,7 +373,7 @@ describe('ActsGetAllAccounts', function () {
function getAllCallback(err, data){ function getAllCallback(err, data){
console.debug("====>getAllAccounts 1100 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 1100 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 1100 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 1100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data[0].name).assertEqual("account_name_scene_single"); expect(data[0].name).assertEqual("account_name_scene_single");
expect(data[0].owner).assertEqual("com.example.actsscenegetallaccounts"); expect(data[0].owner).assertEqual("com.example.actsscenegetallaccounts");
console.debug("====>ActsGetAllAccounts_1100 end===="); console.debug("====>ActsGetAllAccounts_1100 end====");
...@@ -479,20 +479,20 @@ describe('ActsGetAllAccounts', function () { ...@@ -479,20 +479,20 @@ describe('ActsGetAllAccounts', function () {
var selfBundle = "com.example.actsgetallaaccounts"; var selfBundle = "com.example.actsgetallaaccounts";
appAccountManager.addAccount("account_callback_delete", (err)=>{ appAccountManager.addAccount("account_callback_delete", (err)=>{
console.debug("====>add account 1500 err:" + JSON.stringify(err)); console.debug("====>add account 1500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 1500 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 1500 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 1500 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 1500 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data[0].name).assertEqual("account_callback_delete"); expect(data[0].name).assertEqual("account_callback_delete");
expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts"); expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts");
appAccountManager.deleteAccount("account_callback_delete", (err)=>{ appAccountManager.deleteAccount("account_callback_delete", (err)=>{
console.debug("====>delete account 1500 err:" + JSON.stringify(err)); console.debug("====>delete account 1500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 1500 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 1500 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 1500 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 1500 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(0); expect(data.length).assertEqual(0);
console.debug("====>ActsGetAllAccounts_1500 end===="); console.debug("====>ActsGetAllAccounts_1500 end====");
done(); done();
...@@ -569,20 +569,20 @@ describe('ActsGetAllAccounts', function () { ...@@ -569,20 +569,20 @@ describe('ActsGetAllAccounts', function () {
var selfBundle = "com.example.actsgetallaaccounts"; var selfBundle = "com.example.actsgetallaaccounts";
appAccountManager.addAccount("account_callback_additional", "account_extrainfo", (err)=>{ appAccountManager.addAccount("account_callback_additional", "account_extrainfo", (err)=>{
console.debug("====>add account 1700 err:" + JSON.stringify(err)); console.debug("====>add account 1700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 1700 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 1700 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 1700 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 1700 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data[0].name).assertEqual("account_callback_additional"); expect(data[0].name).assertEqual("account_callback_additional");
expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts"); expect(data[0].owner).assertEqual("com.example.actsgetallaaccounts");
appAccountManager.deleteAccount("account_callback_additional", (err)=>{ appAccountManager.deleteAccount("account_callback_additional", (err)=>{
console.debug("====>delete account 1700 err:" + JSON.stringify(err)); console.debug("====>delete account 1700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{ appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 1700 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 1700 err:" + JSON.stringify(err));
console.debug("====>getAllAccounts 1700 data:" + JSON.stringify(data)); console.debug("====>getAllAccounts 1700 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(0); expect(data.length).assertEqual(0);
console.debug("====>ActsGetAllAccounts_1700 end===="); console.debug("====>ActsGetAllAccounts_1700 end====");
done(); done();
......
...@@ -53,15 +53,15 @@ describe('ActsSetCheckSyncEnable', function () { ...@@ -53,15 +53,15 @@ describe('ActsSetCheckSyncEnable', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_notset", (err)=>{ appAccountManager.addAccount("syncenable_callback_notset", (err)=>{
console.debug("====>add account ActsSetCheckSyncEnable_0100 err:" + JSON.stringify(err)); console.debug("====>add account ActsSetCheckSyncEnable_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_notset", (err, data)=>{ appAccountManager.checkAppAccountSyncEnable("syncenable_callback_notset", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 0100 err:" + JSON.stringify(err)); console.debug("====>checkAppAccountSyncEnable 0100 err:" + JSON.stringify(err));
console.debug("====>checkAppAccountSyncEnable 0100 data:" + JSON.stringify(data)); console.debug("====>checkAppAccountSyncEnable 0100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(false); expect(data).assertEqual(false);
appAccountManager.deleteAccount("syncenable_callback_notset", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_notset", (err)=>{
console.debug("====>delete Account ActsSetCheckSyncEnable_0100 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsSetCheckSyncEnable_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsSetCheckSyncEnable_0100 end===="); console.debug("====>ActsSetCheckSyncEnable_0100 end====");
done(); done();
}); });
...@@ -122,18 +122,18 @@ describe('ActsSetCheckSyncEnable', function () { ...@@ -122,18 +122,18 @@ describe('ActsSetCheckSyncEnable', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_settrue", (err)=>{ appAccountManager.addAccount("syncenable_callback_settrue", (err)=>{
console.debug("====>add account ActsSetCheckSyncEnable_0300 err:" + JSON.stringify(err)); console.debug("====>add account ActsSetCheckSyncEnable_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_settrue", true, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_settrue", true, (err)=>{
console.debug("====>setAppAccountSyncEnable 0300 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable 0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_settrue", (err, data)=>{ appAccountManager.checkAppAccountSyncEnable("syncenable_callback_settrue", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 0300 err:" + JSON.stringify(err)); console.debug("====>checkAppAccountSyncEnable 0300 err:" + JSON.stringify(err));
console.debug("====>checkAppAccountSyncEnable 0300 data:" + JSON.stringify(data)); console.debug("====>checkAppAccountSyncEnable 0300 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(true); expect(data).assertEqual(true);
appAccountManager.deleteAccount("syncenable_callback_settrue", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_settrue", (err)=>{
console.debug("====>delete Account ActsSetCheckSyncEnable_0300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsSetCheckSyncEnable_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsSetCheckSyncEnable_0300 end===="); console.debug("====>ActsSetCheckSyncEnable_0300 end====");
done(); done();
}); });
...@@ -197,18 +197,18 @@ describe('ActsSetCheckSyncEnable', function () { ...@@ -197,18 +197,18 @@ describe('ActsSetCheckSyncEnable', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_setfalse", (err)=>{ appAccountManager.addAccount("syncenable_callback_setfalse", (err)=>{
console.debug("====>add account ActsSetCheckSyncEnable_0500 err:" + JSON.stringify(err)); console.debug("====>add account ActsSetCheckSyncEnable_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_setfalse", false, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_setfalse", false, (err)=>{
console.debug("====>setAppAccountSyncEnable 0500 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_setfalse", (err, data)=>{ appAccountManager.checkAppAccountSyncEnable("syncenable_callback_setfalse", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 0500 err:" + JSON.stringify(err)); console.debug("====>checkAppAccountSyncEnable 0500 err:" + JSON.stringify(err));
console.debug("====>checkAppAccountSyncEnable 0500 data:" + JSON.stringify(data)); console.debug("====>checkAppAccountSyncEnable 0500 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(false); expect(data).assertEqual(false);
appAccountManager.deleteAccount("syncenable_callback_setfalse", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_setfalse", (err)=>{
console.debug("====>delete Account ActsSetCheckSyncEnable_0500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsSetCheckSyncEnable_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsSetCheckSyncEnable_0500 end===="); console.debug("====>ActsSetCheckSyncEnable_0500 end====");
done(); done();
}); });
...@@ -273,21 +273,21 @@ describe('ActsSetCheckSyncEnable', function () { ...@@ -273,21 +273,21 @@ describe('ActsSetCheckSyncEnable', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_falsetrue", (err)=>{ appAccountManager.addAccount("syncenable_callback_falsetrue", (err)=>{
console.debug("====>add account ActsSetCheckSyncEnable_0700 err:" + JSON.stringify(err)); console.debug("====>add account ActsSetCheckSyncEnable_0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", false, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", false, (err)=>{
console.debug("====>setAppAccountSyncEnable first time 0700 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable first time 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", true, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", true, (err)=>{
console.debug("====>setAppAccountSyncEnable second time 0700 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable second time 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_falsetrue", (err, data)=>{ appAccountManager.checkAppAccountSyncEnable("syncenable_callback_falsetrue", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 0700 err:" + JSON.stringify(err)); console.debug("====>checkAppAccountSyncEnable 0700 err:" + JSON.stringify(err));
console.debug("====>checkAppAccountSyncEnable 0700 data:" + JSON.stringify(data)); console.debug("====>checkAppAccountSyncEnable 0700 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(true); expect(data).assertEqual(true);
appAccountManager.deleteAccount("syncenable_callback_falsetrue", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_falsetrue", (err)=>{
console.debug("====>delete Account 0700 err:" + JSON.stringify(err)); console.debug("====>delete Account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsSetCheckSyncEnable_0700 end===="); console.debug("====>ActsSetCheckSyncEnable_0700 end====");
done(); done();
}); });
...@@ -349,21 +349,21 @@ describe('ActsSetCheckSyncEnable', function () { ...@@ -349,21 +349,21 @@ describe('ActsSetCheckSyncEnable', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_falsetrue", (err)=>{ appAccountManager.addAccount("syncenable_callback_falsetrue", (err)=>{
console.debug("====>add account ActsSetCheckSyncEnable_0900 err:" + JSON.stringify(err)); console.debug("====>add account ActsSetCheckSyncEnable_0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", true, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", true, (err)=>{
console.debug("====>setAppAccountSyncEnable first time 0900 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable first time 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", false, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_falsetrue", false, (err)=>{
console.debug("====>setAppAccountSyncEnable second time 0900 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable second time 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_falsetrue", (err, data)=>{ appAccountManager.checkAppAccountSyncEnable("syncenable_callback_falsetrue", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 0900 err:" + JSON.stringify(err)); console.debug("====>checkAppAccountSyncEnable 0900 err:" + JSON.stringify(err));
console.debug("====>checkAppAccountSyncEnable 0900 data:" + JSON.stringify(data)); console.debug("====>checkAppAccountSyncEnable 0900 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(false); expect(data).assertEqual(false);
appAccountManager.deleteAccount("syncenable_callback_falsetrue", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_falsetrue", (err)=>{
console.debug("====>delete Account 0900 err:" + JSON.stringify(err)); console.debug("====>delete Account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsSetCheckSyncEnable_0900 end===="); console.debug("====>ActsSetCheckSyncEnable_0900 end====");
done(); done();
}); });
...@@ -425,21 +425,21 @@ describe('ActsSetCheckSyncEnable', function () { ...@@ -425,21 +425,21 @@ describe('ActsSetCheckSyncEnable', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_truetrue", (err)=>{ appAccountManager.addAccount("syncenable_callback_truetrue", (err)=>{
console.debug("====>add account ActsSetCheckSyncEnable_1100 err:" + JSON.stringify(err)); console.debug("====>add account ActsSetCheckSyncEnable_1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_truetrue", true, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_truetrue", true, (err)=>{
console.debug("====>setAppAccountSyncEnable first time 1100 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable first time 1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_truetrue", true, (err)=>{ appAccountManager.setAppAccountSyncEnable("syncenable_callback_truetrue", true, (err)=>{
console.debug("====>setAppAccountSyncEnable second time 1100 err:" + JSON.stringify(err)); console.debug("====>setAppAccountSyncEnable second time 1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_truetrue", (err, data)=>{ appAccountManager.checkAppAccountSyncEnable("syncenable_callback_truetrue", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 1100 err:" + JSON.stringify(err)); console.debug("====>checkAppAccountSyncEnable 1100 err:" + JSON.stringify(err));
console.debug("====>checkAppAccountSyncEnable 1100 data:" + JSON.stringify(data)); console.debug("====>checkAppAccountSyncEnable 1100 data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(true); expect(data).assertEqual(true);
appAccountManager.deleteAccount("syncenable_callback_truetrue", (err)=>{ appAccountManager.deleteAccount("syncenable_callback_truetrue", (err)=>{
console.debug("====>delete Account 1100 err:" + JSON.stringify(err)); console.debug("====>delete Account 1100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsSetCheckSyncEnable_1100 end===="); console.debug("====>ActsSetCheckSyncEnable_1100 end====");
done(); done();
}); });
......
...@@ -33,7 +33,7 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -33,7 +33,7 @@ describe('ActsGetAllAccessibleAccounts', function () {
console.debug("====>getAllAccessibleAccounts 0100 err:" + JSON.stringify(err)); console.debug("====>getAllAccessibleAccounts 0100 err:" + JSON.stringify(err));
console.debug("====>getAllAccessibleAccounts 0100 data:" + JSON.stringify(data)); console.debug("====>getAllAccessibleAccounts 0100 data:" + JSON.stringify(data));
console.debug("====>getAllAccessibleAccounts 0100 data.length:" + data.length); console.debug("====>getAllAccessibleAccounts 0100 data.length:" + data.length);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(0); expect(data.length).assertEqual(0);
console.debug("====>ActsGetAllAccessibleAccounts_0100 end===="); console.debug("====>ActsGetAllAccessibleAccounts_0100 end====");
done(); done();
...@@ -77,12 +77,12 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -77,12 +77,12 @@ describe('ActsGetAllAccessibleAccounts', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("accessibleAccount_callback_single", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_single", (err)=>{
console.debug("====> add account ActsGetAllAccessibleAccounts_0300 err:" + JSON.stringify(err)); console.debug("====> add account ActsGetAllAccessibleAccounts_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccessibleAccounts((err, data)=>{ appAccountManager.getAllAccessibleAccounts((err, data)=>{
console.debug("====>getAllAccessibleAccounts 0300 err:" + JSON.stringify(err)); console.debug("====>getAllAccessibleAccounts 0300 err:" + JSON.stringify(err));
console.debug("====>getAllAccessibleAccounts 0300 data:" + JSON.stringify(data)); console.debug("====>getAllAccessibleAccounts 0300 data:" + JSON.stringify(data));
console.debug("====>getAllAccessibleAccounts 0300 data.length:" + data.length); console.debug("====>getAllAccessibleAccounts 0300 data.length:" + data.length);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(1); expect(data.length).assertEqual(1);
try{ try{
expect(data[0].name).assertEqual("accessibleAccount_callback_single"); expect(data[0].name).assertEqual("accessibleAccount_callback_single");
...@@ -95,7 +95,7 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -95,7 +95,7 @@ describe('ActsGetAllAccessibleAccounts', function () {
} }
appAccountManager.deleteAccount("accessibleAccount_callback_single", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_single", (err)=>{
console.debug("====>delete Account ActsGetAllAccessibleAccounts_0300 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsGetAllAccessibleAccounts_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsGetAllAccessibleAccounts_0300 end===="); console.debug("====>ActsGetAllAccessibleAccounts_0300 end====");
done(); done();
}) })
...@@ -166,18 +166,18 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -166,18 +166,18 @@ describe('ActsGetAllAccessibleAccounts', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("accessibleAccount_callback_first", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_first", (err)=>{
console.debug("====>add account first time 0500 err:" + JSON.stringify(err)); console.debug("====>add account first time 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.addAccount("accessibleAccount_callback_second", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_second", (err)=>{
console.debug("====>add account second time 0500 err:" + JSON.stringify(err)); console.debug("====>add account second time 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.addAccount("accessibleAccount_callback_third", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_third", (err)=>{
console.debug("====>add account third time 0500 err:" + JSON.stringify(err)); console.debug("====>add account third time 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccessibleAccounts((err, data)=>{ appAccountManager.getAllAccessibleAccounts((err, data)=>{
console.debug("====>getAllAccessibleAccounts 0500 err:" + JSON.stringify(err)); console.debug("====>getAllAccessibleAccounts 0500 err:" + JSON.stringify(err));
console.debug("====>getAllAccessibleAccounts 0500 data:" + JSON.stringify(data)); console.debug("====>getAllAccessibleAccounts 0500 data:" + JSON.stringify(data));
console.debug("====>getAllAccessibleAccounts 0500 data.length:" + data.length); console.debug("====>getAllAccessibleAccounts 0500 data.length:" + data.length);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
try{ try{
expect(data[0].name).assertEqual("accessibleAccount_callback_first"); expect(data[0].name).assertEqual("accessibleAccount_callback_first");
...@@ -194,13 +194,13 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -194,13 +194,13 @@ describe('ActsGetAllAccessibleAccounts', function () {
} }
appAccountManager.deleteAccount("accessibleAccount_callback_first", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_first", (err)=>{
console.debug("====>delete Account first 0500 err:" + JSON.stringify(err)); console.debug("====>delete Account first 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("accessibleAccount_callback_second", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_second", (err)=>{
console.debug("====>delete Account second 0500 err:" + JSON.stringify(err)); console.debug("====>delete Account second 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("accessibleAccount_callback_third", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_third", (err)=>{
console.debug("====>delete Account third 0500 err:" + JSON.stringify(err)); console.debug("====>delete Account third 0500 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsGetAllAccessibleAccounts_0500 end===="); console.debug("====>ActsGetAllAccessibleAccounts_0500 end====");
done(); done();
}) })
...@@ -288,21 +288,21 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -288,21 +288,21 @@ describe('ActsGetAllAccessibleAccounts', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("accessibleAccount_callback_delete_first", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_delete_first", (err)=>{
console.debug("====>add first account 0700 err:" + JSON.stringify(err)); console.debug("====>add first account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.addAccount("accessibleAccount_callback_delete_second", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_delete_second", (err)=>{
console.debug("====>add second account 0700 err:" + JSON.stringify(err)); console.debug("====>add second account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.addAccount("accessibleAccount_callback_delete_third", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_delete_third", (err)=>{
console.debug("====>add third account 0700 err:" + JSON.stringify(err)); console.debug("====>add third account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("accessibleAccount_callback_delete_second", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_delete_second", (err)=>{
console.debug("====>delete second account 0700 err:" + JSON.stringify(err)); console.debug("====>delete second account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccessibleAccounts((err, data)=>{ appAccountManager.getAllAccessibleAccounts((err, data)=>{
console.debug("====>getAllAccessibleAccounts 0700 err:" + JSON.stringify(err)); console.debug("====>getAllAccessibleAccounts 0700 err:" + JSON.stringify(err));
console.debug("====>getAllAccessibleAccounts 0700 data:" + JSON.stringify(data)); console.debug("====>getAllAccessibleAccounts 0700 data:" + JSON.stringify(data));
console.debug("====>getAllAccessibleAccounts 0700 data.length:" + data.length); console.debug("====>getAllAccessibleAccounts 0700 data.length:" + data.length);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(2); expect(data.length).assertEqual(2);
try{ try{
expect(data[0].name).assertEqual("accessibleAccount_callback_delete_first"); expect(data[0].name).assertEqual("accessibleAccount_callback_delete_first");
...@@ -317,10 +317,10 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -317,10 +317,10 @@ describe('ActsGetAllAccessibleAccounts', function () {
} }
appAccountManager.deleteAccount("accessibleAccount_callback_delete_first", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_delete_first", (err)=>{
console.debug("====>delete first account 0700 err:" + JSON.stringify(err)); console.debug("====>delete first account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("accessibleAccount_callback_delete_third", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_delete_third", (err)=>{
console.debug("====>delete third account 0700 err:" + JSON.stringify(err)); console.debug("====>delete third account 0700 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsGetAllAccessibleAccounts_0700 end===="); console.debug("====>ActsGetAllAccessibleAccounts_0700 end====");
done(); done();
}) })
...@@ -407,15 +407,15 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -407,15 +407,15 @@ describe('ActsGetAllAccessibleAccounts', function () {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
appAccountManager.addAccount("accessibleAccount_callback_multiple_first", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_multiple_first", (err)=>{
console.debug("====>add first account 0900 err:" + JSON.stringify(err)); console.debug("====>add first account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.addAccount("accessibleAccount_callback_multiple_second", (err)=>{ appAccountManager.addAccount("accessibleAccount_callback_multiple_second", (err)=>{
console.debug("====>add third account 0900 err:" + JSON.stringify(err)); console.debug("====>add third account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.getAllAccessibleAccounts((err, data)=>{ appAccountManager.getAllAccessibleAccounts((err, data)=>{
console.debug("====>getAllAccessibleAccounts first 0900 err:" + JSON.stringify(err)); console.debug("====>getAllAccessibleAccounts first 0900 err:" + JSON.stringify(err));
console.debug("====>getAllAccessibleAccounts first 0900 data:" + JSON.stringify(data)); console.debug("====>getAllAccessibleAccounts first 0900 data:" + JSON.stringify(data));
console.debug("====>getAllAccessibleAccounts first 0900 data.length:" + data.length); console.debug("====>getAllAccessibleAccounts first 0900 data.length:" + data.length);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(2); expect(data.length).assertEqual(2);
try{ try{
expect(data[0].name).assertEqual("accessibleAccount_callback_multiple_first"); expect(data[0].name).assertEqual("accessibleAccount_callback_multiple_first");
...@@ -432,7 +432,7 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -432,7 +432,7 @@ describe('ActsGetAllAccessibleAccounts', function () {
console.debug("====>getAllAccessibleAccounts second 0900 err:" + JSON.stringify(err)); console.debug("====>getAllAccessibleAccounts second 0900 err:" + JSON.stringify(err));
console.debug("====>getAllAccessibleAccounts second 0900 data:" + JSON.stringify(data)); console.debug("====>getAllAccessibleAccounts second 0900 data:" + JSON.stringify(data));
console.debug("====>getAllAccessibleAccounts second 0900 data.length:" + data.length); console.debug("====>getAllAccessibleAccounts second 0900 data.length:" + data.length);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.length).assertEqual(2); expect(data.length).assertEqual(2);
try{ try{
expect(data[0].name).assertEqual("accessibleAccount_callback_multiple_first"); expect(data[0].name).assertEqual("accessibleAccount_callback_multiple_first");
...@@ -447,10 +447,10 @@ describe('ActsGetAllAccessibleAccounts', function () { ...@@ -447,10 +447,10 @@ describe('ActsGetAllAccessibleAccounts', function () {
} }
appAccountManager.deleteAccount("accessibleAccount_callback_multiple_first", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_multiple_first", (err)=>{
console.debug("====>delete first account 0900 err:" + JSON.stringify(err)); console.debug("====>delete first account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.deleteAccount("accessibleAccount_callback_multiple_second", (err)=>{ appAccountManager.deleteAccount("accessibleAccount_callback_multiple_second", (err)=>{
console.debug("====>delete second account 0900 err:" + JSON.stringify(err)); console.debug("====>delete second account 0900 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsGetAllAccessibleAccounts_0900 end===="); console.debug("====>ActsGetAllAccessibleAccounts_0900 end====");
done(); done();
}) })
......
...@@ -27,6 +27,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -27,6 +27,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it('ActsOsAccountGetIdFormUid_0100', 0, async function (done) { it('ActsOsAccountGetIdFormUid_0100', 0, async function (done) {
console.debug("====>ActsOsAccountGetIdFormUid_0100 start===="); console.debug("====>ActsOsAccountGetIdFormUid_0100 start====");
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
var testLocalId = await osAccountManager.getOsAccountLocalIdFromProcess();
console.debug("====>testLocalId:" + testLocalId)
console.debug("====>get AccountManager finish===="); console.debug("====>get AccountManager finish====");
var bundleName = "com.example.actsosaccountthirdpartytest"; var bundleName = "com.example.actsosaccountthirdpartytest";
var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES);
...@@ -35,8 +37,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -35,8 +37,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager.getOsAccountLocalIdFromUid(uid, (err, localId)=>{ osAccountManager.getOsAccountLocalIdFromUid(uid, (err, localId)=>{
console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>get localId err: " + JSON.stringify(err));
console.debug("====>localId obtained by uid:" + localId); console.debug("====>localId obtained by uid:" + localId);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(localId).assertEqual(100); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountGetIdFormUid_0100 end===="); console.debug("====>ActsOsAccountGetIdFormUid_0100 end====");
done(); done();
}); });
...@@ -50,6 +52,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -50,6 +52,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it('ActsOsAccountGetIdFormUid_0200', 0, async function (done) { it('ActsOsAccountGetIdFormUid_0200', 0, async function (done) {
console.debug("====>ActsOsAccountGetIdFormUid_0200 start===="); console.debug("====>ActsOsAccountGetIdFormUid_0200 start====");
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
var testLocalId = await osAccountManager.getOsAccountLocalIdFromProcess();
console.debug("====>get AccountManager finish===="); console.debug("====>get AccountManager finish====");
var bundleName = "com.example.actsosaccountthirdpartytest"; var bundleName = "com.example.actsosaccountthirdpartytest";
var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES);
...@@ -57,7 +60,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -57,7 +60,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
console.debug("====>obtained uid:" + uid); console.debug("====>obtained uid:" + uid);
var localId = await osAccountManager.getOsAccountLocalIdFromUid(uid); var localId = await osAccountManager.getOsAccountLocalIdFromUid(uid);
console.debug("====>localId obtained by uid:" + localId); console.debug("====>localId obtained by uid:" + localId);
expect(localId).assertEqual(100); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountGetIdFormUid_0200 end===="); console.debug("====>ActsOsAccountGetIdFormUid_0200 end====");
done(); done();
}); });
...@@ -76,7 +79,6 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -76,7 +79,6 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>get localId err: " + JSON.stringify(err));
console.debug("====>localId obtained by uid:" + localId); console.debug("====>localId obtained by uid:" + localId);
expect(err.code).assertEqual(ERR_OS_ACCOUNT_SERVICE_MANAGER_BAD_UID_ERR); expect(err.code).assertEqual(ERR_OS_ACCOUNT_SERVICE_MANAGER_BAD_UID_ERR);
expect(localId).assertEqual(undefined);
console.debug("====>ActsOsAccountGetIdFormUid_0300 end===="); console.debug("====>ActsOsAccountGetIdFormUid_0300 end====");
done(); done();
}); });
...@@ -116,7 +118,6 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -116,7 +118,6 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>get localId err: " + JSON.stringify(err));
console.debug("====>localId obtained by uid:" + localId); console.debug("====>localId obtained by uid:" + localId);
expect(err.code).assertEqual(ERR_OS_ACCOUNT_SERVICE_MANAGER_BAD_UID_ERR); expect(err.code).assertEqual(ERR_OS_ACCOUNT_SERVICE_MANAGER_BAD_UID_ERR);
expect(localId).assertEqual(undefined);
console.debug("====>ActsOsAccountGetIdFormUid_0500 end===="); console.debug("====>ActsOsAccountGetIdFormUid_0500 end====");
done(); done();
}); });
...@@ -150,12 +151,16 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -150,12 +151,16 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it('ActsOsAccountGetIdFormProcess_0100', 0, async function (done) { it('ActsOsAccountGetIdFormProcess_0100', 0, async function (done) {
console.debug("====>ActsOsAccountGetIdFormProcess_0100 start===="); console.debug("====>ActsOsAccountGetIdFormProcess_0100 start====");
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
var bundleName = "com.example.actsosaccountthirdpartytest";
var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES);
var uid = bundleInfo.uid;
var testLocalId = await osAccountManager.getOsAccountLocalIdFromUid(uid)
console.debug("====>get AccountManager finish===="); console.debug("====>get AccountManager finish====");
osAccountManager.getOsAccountLocalIdFromProcess((err, localId)=>{ osAccountManager.getOsAccountLocalIdFromProcess((err, localId)=>{
console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>get localId err: " + JSON.stringify(err));
console.debug("====>localId obtained by process:" + localId); console.debug("====>localId obtained by process:" + localId);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(localId).assertEqual(100); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountGetIdFormProcess_0100 end===="); console.debug("====>ActsOsAccountGetIdFormProcess_0100 end====");
done(); done();
}); });
...@@ -169,10 +174,15 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -169,10 +174,15 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it('ActsOsAccountGetIdFormProcess_0200', 0, async function (done) { it('ActsOsAccountGetIdFormProcess_0200', 0, async function (done) {
console.debug("====>ActsOsAccountGetIdFormProcess_0200 start===="); console.debug("====>ActsOsAccountGetIdFormProcess_0200 start====");
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
var bundleName = "com.example.actsosaccountthirdpartytest";
var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES);
var uid = bundleInfo.uid;
var testLocalId = await osAccountManager.getOsAccountLocalIdFromUid(uid)
console.debug("====>testLocalId obtained by process:" + testLocalId)
console.debug("====>get AccountManager finish===="); console.debug("====>get AccountManager finish====");
var localId = await osAccountManager.getOsAccountLocalIdFromProcess(); var localId = await osAccountManager.getOsAccountLocalIdFromProcess();
console.debug("====>localId obtained by process:" + localId); console.debug("====>localId obtained by process:" + localId);
expect(localId).assertEqual(100); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountGetIdFormProcess_0200 end===="); console.debug("====>ActsOsAccountGetIdFormProcess_0200 end====");
done(); done();
}); });
...@@ -189,7 +199,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -189,7 +199,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager.getOsAccountTypeFromProcess((err, accountType)=>{ osAccountManager.getOsAccountTypeFromProcess((err, accountType)=>{
console.debug("====>get type err: " + JSON.stringify(err)); console.debug("====>get type err: " + JSON.stringify(err));
console.debug("====>type obtained by process:" + JSON.stringify(accountType)); console.debug("====>type obtained by process:" + JSON.stringify(accountType));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(accountType.ADMIN).assertEqual(0); expect(accountType.ADMIN).assertEqual(0);
console.debug("====>ActsOsAccountGetTypeFormProcess_0100 end===="); console.debug("====>ActsOsAccountGetTypeFormProcess_0100 end====");
done(); done();
...@@ -220,11 +230,12 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -220,11 +230,12 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it('ActsOsAccountLocalIdSerial_0100', 0, async function (done) { it('ActsOsAccountLocalIdSerial_0100', 0, async function (done) {
console.debug("====>ActsOsAccountLocalIdSerial_0100 start===="); console.debug("====>ActsOsAccountLocalIdSerial_0100 start====");
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
var testLocalId = await osAccountManager.getOsAccountLocalIdFromProcess();
console.debug("====>get AccountManager finish===="); console.debug("====>get AccountManager finish====");
osAccountManager.getSerialNumberByOsAccountLocalId(100, (err, serialNumber)=>{ osAccountManager.getSerialNumberByOsAccountLocalId(100, (err, serialNumber)=>{
console.debug("====>ger serialNumber err:" + JSON.stringify(err)); console.debug("====>ger serialNumber err:" + JSON.stringify(err));
console.debug("====>get serialNumber:" + serialNumber + " by localId: 100" ); console.debug("====>get serialNumber:" + serialNumber + " by localId: 100" );
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
var serialNumberStr = serialNumber.toString(); var serialNumberStr = serialNumber.toString();
var serialIntercept = serialNumberStr.substring(8); var serialIntercept = serialNumberStr.substring(8);
console.debug("====>truncate the last eight characters: " + serialIntercept); console.debug("====>truncate the last eight characters: " + serialIntercept);
...@@ -232,8 +243,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -232,8 +243,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber, (err, localId)=>{ osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber, (err, localId)=>{
console.debug("====>ger localId err:" + JSON.stringify(err)); console.debug("====>ger localId err:" + JSON.stringify(err));
console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber); console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(localId).assertEqual(100); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountLocalIdSerial_0100 end===="); console.debug("====>ActsOsAccountLocalIdSerial_0100 end====");
done(); done();
}) })
...@@ -248,8 +259,9 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -248,8 +259,9 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it('ActsOsAccountLocalIdSerial_0200', 0, async function (done) { it('ActsOsAccountLocalIdSerial_0200', 0, async function (done) {
console.debug("====>ActsOsAccountLocalIdSerial_0200 start===="); console.debug("====>ActsOsAccountLocalIdSerial_0200 start====");
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
var testLocalId = await osAccountManager.getOsAccountLocalIdFromProcess();
console.debug("====>get AccountManager finish===="); console.debug("====>get AccountManager finish====");
var serialNumber = await osAccountManager.getSerialNumberByOsAccountLocalId(100); var serialNumber = await osAccountManager.getSerialNumberByOsAccountLocalId(testLocalId);
console.debug("====>get serialNumber:" + serialNumber + " by localId: 100" ); console.debug("====>get serialNumber:" + serialNumber + " by localId: 100" );
var serialNumberStr = serialNumber.toString(); var serialNumberStr = serialNumber.toString();
var serialIntercept = serialNumberStr.substring(8); var serialIntercept = serialNumberStr.substring(8);
...@@ -257,7 +269,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -257,7 +269,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
expect(serialIntercept).assertEqual("00000001"); expect(serialIntercept).assertEqual("00000001");
var localId = await osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber); var localId = await osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber);
console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber); console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber);
expect(localId).assertEqual(100); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountLocalIdSerial_0200 end===="); console.debug("====>ActsOsAccountLocalIdSerial_0200 end====");
done(); done();
}); });
...@@ -274,7 +286,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -274,7 +286,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager.getSerialNumberByOsAccountLocalId(0, (err, serialNumber)=>{ osAccountManager.getSerialNumberByOsAccountLocalId(0, (err, serialNumber)=>{
console.debug("====>ger serialNumber err:" + JSON.stringify(err)); console.debug("====>ger serialNumber err:" + JSON.stringify(err));
console.debug("====>get serialNumber:" + serialNumber + " by localId: 0" ); console.debug("====>get serialNumber:" + serialNumber + " by localId: 0" );
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
var serialNumberStr = serialNumber.toString(); var serialNumberStr = serialNumber.toString();
var serialIntercept = serialNumberStr.substring(8); var serialIntercept = serialNumberStr.substring(8);
console.debug("====>truncate the last eight characters: " + serialIntercept); console.debug("====>truncate the last eight characters: " + serialIntercept);
...@@ -282,7 +294,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -282,7 +294,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber, (err, localId)=>{ osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber, (err, localId)=>{
console.debug("====>ger localId err:" + JSON.stringify(err)); console.debug("====>ger localId err:" + JSON.stringify(err));
console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber); console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(localId).assertEqual(0); expect(localId).assertEqual(0);
console.debug("====>ActsOsAccountLocalIdSerial_0300 end===="); console.debug("====>ActsOsAccountLocalIdSerial_0300 end====");
done(); done();
...@@ -326,7 +338,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -326,7 +338,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager.createOsAccount("osAccountNameIdSerialA", osaccount.OsAccountType.NORMAL, (err, data)=>{ osAccountManager.createOsAccount("osAccountNameIdSerialA", osaccount.OsAccountType.NORMAL, (err, data)=>{
console.debug("====>create os account err: " + JSON.stringify(err)); console.debug("====>create os account err: " + JSON.stringify(err));
console.debug("====>create os account OsAccountInfo: " + JSON.stringify(data)); console.debug("====>create os account OsAccountInfo: " + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.localName).assertEqual("osAccountNameIdSerialA"); expect(data.localName).assertEqual("osAccountNameIdSerialA");
expect(data.domainInfo.accountName == "").assertEqual(true) expect(data.domainInfo.accountName == "").assertEqual(true)
expect(data.type.NORMAL).assertEqual(1); expect(data.type.NORMAL).assertEqual(1);
...@@ -334,19 +346,25 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -334,19 +346,25 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
expect(data.isVerified).assertEqual(false); expect(data.isVerified).assertEqual(false);
expect(data.distributedInfo.name != null).assertEqual(true); expect(data.distributedInfo.name != null).assertEqual(true);
expect(data.domainInfo.domain == "").assertEqual(true); expect(data.domainInfo.domain == "").assertEqual(true);
expect(data.photo == "").assertEqual(true);
expect(data.createTime != "").assertEqual(true);
expect(data.lastLoginTime>=0).assertEqual(true);
expect(JSON.stringify(data.serialNumber).length == 16).assertEqual(true);
expect(data.isActived).assertEqual(false);
expect(data.isCreateCompleted).assertEqual(true)
localId = data.localId; localId = data.localId;
osAccountManager.getSerialNumberByOsAccountLocalId(localId, (err, serialNumber)=>{ osAccountManager.getSerialNumberByOsAccountLocalId(localId, (err, serialNumber)=>{
console.debug("====>queryOsAccountById err:" + JSON.stringify(err)); console.debug("====>queryOsAccountById err:" + JSON.stringify(err));
console.debug("====>get serialNumber:" + serialNumber + " by localId: " + localId); console.debug("====>get serialNumber:" + serialNumber + " by localId: " + localId);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber, (err, getlocalId)=>{ osAccountManager.getOsAccountLocalIdBySerialNumber(serialNumber, (err, getlocalId)=>{
console.debug("====>ger localId err:" + JSON.stringify(err)); console.debug("====>ger localId err:" + JSON.stringify(err));
console.debug("====>get localId:" + getlocalId + " by serialNumber: " + serialNumber); console.debug("====>get localId:" + getlocalId + " by serialNumber: " + serialNumber);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(getlocalId).assertEqual(localId); expect(getlocalId).assertEqual(localId);
osAccountManager.removeOsAccount(localId, (err)=>{ osAccountManager.removeOsAccount(localId, (err)=>{
console.debug("====>remove localId: " + localId + " err:" + JSON.stringify(err)); console.debug("====>remove localId: " + localId + " err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsOsAccountLocalIdSerial_0500 end===="); console.debug("====>ActsOsAccountLocalIdSerial_0500 end====");
done(); done();
}) })
...@@ -366,7 +384,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -366,7 +384,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
console.debug("====>get AccountManager finish===="); console.debug("====>get AccountManager finish====");
var localId; var localId;
var OsAccountInfo = await osAccountManager.createOsAccount("accountIdSerialB", osaccount.OsAccountType.NORMAL); var OsAccountInfo = await osAccountManager.createOsAccount("accountIdSerialB", osaccount.OsAccountType.Guest);
console.debug("====>create os account OsAccountInfo: " + JSON.stringify(OsAccountInfo)); console.debug("====>create os account OsAccountInfo: " + JSON.stringify(OsAccountInfo));
expect(OsAccountInfo.localName).assertEqual("accountIdSerialB"); expect(OsAccountInfo.localName).assertEqual("accountIdSerialB");
localId = OsAccountInfo.localId; localId = OsAccountInfo.localId;
...@@ -395,38 +413,38 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -395,38 +413,38 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager.getCreatedOsAccountsCount((err, data)=>{ osAccountManager.getCreatedOsAccountsCount((err, data)=>{
console.debug("====>obtains the number of all os accounts created err:" + JSON.stringify(err)); console.debug("====>obtains the number of all os accounts created err:" + JSON.stringify(err));
console.debug("====>obtains the number of all os accounts created data:" + data); console.debug("====>obtains the number of all os accounts created data:" + data);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
obtainCount = data; obtainCount = data;
osAccountManager.createOsAccount("osAccountNameIdSerialE", osaccount.OsAccountType.NORMAL, (err, data)=>{ osAccountManager.createOsAccount("osAccountNameIdSerialE", osaccount.OsAccountType.NORMAL, (err, data)=>{
console.debug("====>create first os account err: " + JSON.stringify(err)); console.debug("====>create first os account err: " + JSON.stringify(err));
console.debug("====>create first os account OsAccountInfo: " + JSON.stringify(data)); console.debug("====>create first os account OsAccountInfo: " + JSON.stringify(data));
localIdFir = data.localId; localIdFir = data.localId;
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.localName).assertEqual("osAccountNameIdSerialE"); expect(data.localName).assertEqual("osAccountNameIdSerialE");
osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{ osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{
console.debug("====>create second os account err: " + JSON.stringify(err)); console.debug("====>create second os account err: " + JSON.stringify(err));
console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data)); console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data));
localIdSec = data.localId; localIdSec = data.localId;
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data.localName).assertEqual("osAccountIdSerialF"); expect(data.localName).assertEqual("osAccountIdSerialF");
osAccountManager.getCreatedOsAccountsCount((err, count)=>{ osAccountManager.getCreatedOsAccountsCount((err, count)=>{
console.debug("====>obtains the number of all os accounts created err:" + JSON.stringify(err)); console.debug("====>obtains the number of all os accounts created err:" + JSON.stringify(err));
console.debug("====>obtains the number of all os accounts created count:" + count); console.debug("====>obtains the number of all os accounts created count:" + count);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
count = count - 2; count = count - 2;
expect(count).assertEqual(obtainCount); expect(count).assertEqual(obtainCount);
osAccountManager.removeOsAccount(localIdFir, (err)=>{ osAccountManager.removeOsAccount(localIdFir, (err)=>{
console.debug("====>remove localId: " + localIdFir + " err:" + JSON.stringify(err)); console.debug("====>remove localId: " + localIdFir + " err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
osAccountManager.getCreatedOsAccountsCount((err, data)=>{ osAccountManager.getCreatedOsAccountsCount((err, data)=>{
console.debug("====>obtains the number accounts created err:" + JSON.stringify(err)); console.debug("====>obtains the number accounts created err:" + JSON.stringify(err));
console.debug("====>obtains the number accounts created data:" + data); console.debug("====>obtains the number accounts created data:" + data);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
data = data - 1; data = data - 1;
expect(data).assertEqual(obtainCount); expect(data).assertEqual(obtainCount);
osAccountManager.removeOsAccount(localIdSec, (err)=>{ osAccountManager.removeOsAccount(localIdSec, (err)=>{
console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err)); console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsOsAccountGetCount_0100 end===="); console.debug("====>ActsOsAccountGetCount_0100 end====");
done(); done();
}) })
...@@ -479,7 +497,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -479,7 +497,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
var osAccountManager = osaccount.getAccountManager(); var osAccountManager = osaccount.getAccountManager();
osAccountManager.queryActivatedOsAccountIds((err,dataArray)=>{ osAccountManager.queryActivatedOsAccountIds((err,dataArray)=>{
console.info("====>ActsOsAccountGQueryActicedOsAccountIds_0100 err :" + JSON.stringify(err)); console.info("====>ActsOsAccountGQueryActicedOsAccountIds_0100 err :" + JSON.stringify(err));
expect(err).assertEqual(undefined) expect(err).assertEqual(null)
console.info("====>ActsOsAccountGQueryActicedOsAccountIds_0100 dataArray" + dataArray.length); console.info("====>ActsOsAccountGQueryActicedOsAccountIds_0100 dataArray" + dataArray.length);
done(); done();
}) })
...@@ -493,7 +511,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () { ...@@ -493,7 +511,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
done(); done();
}).catch((err)=>{ }).catch((err)=>{
console.info("====>ActsOsAccountQueryActivedOsAccountIds_0200 err " + JSON.stringify(err)); console.info("====>ActsOsAccountQueryActivedOsAccountIds_0200 err " + JSON.stringify(err));
expect(err).assertEqual(undefined) expect(err).assertEqual(null)
done(); done();
}); });
}) })
......
...@@ -42,7 +42,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -42,7 +42,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager.getDistributedVirtualDeviceId((err, id)=>{ AccountManager.getDistributedVirtualDeviceId((err, id)=>{
console.debug("====>getDistributedVirtualDeviceId err:" + JSON.stringify(err)); console.debug("====>getDistributedVirtualDeviceId err:" + JSON.stringify(err));
console.debug("====>getDistributedVirtualDeviceId deviceId:" + id); console.debug("====>getDistributedVirtualDeviceId deviceId:" + id);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(id).assertEqual(deviceId); expect(id).assertEqual(deviceId);
console.debug("====>ActsOsAccountDeviceId_0100 end===="); console.debug("====>ActsOsAccountDeviceId_0100 end====");
done(); done();
...@@ -89,7 +89,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -89,7 +89,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager.isOsAccountActived(0, (err, isActived)=>{ AccountManager.isOsAccountActived(0, (err, isActived)=>{
console.debug("====>isOsAccountActived err:" + JSON.stringify(err)); console.debug("====>isOsAccountActived err:" + JSON.stringify(err));
console.debug("====>isOsAccountActived isActived:" + isActived); console.debug("====>isOsAccountActived isActived:" + isActived);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(isActived).assertEqual(true); expect(isActived).assertEqual(true);
console.debug("====>ActsOsAccountIsActived_0100 end"); console.debug("====>ActsOsAccountIsActived_0100 end");
done(); done();
...@@ -245,7 +245,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -245,7 +245,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager.isMultiOsAccountEnable((err, data)=>{ AccountManager.isMultiOsAccountEnable((err, data)=>{
console.debug("====>isMultiOsAccountEnable err:" + JSON.stringify(err)); console.debug("====>isMultiOsAccountEnable err:" + JSON.stringify(err));
console.debug("====>isMultiOsAccountEnable data:" + data); console.debug("====>isMultiOsAccountEnable data:" + data);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(true); expect(data).assertEqual(true);
console.debug("====>ActsOsAccountIsMulty_0100 end===="); console.debug("====>ActsOsAccountIsMulty_0100 end====");
done(); done();
...@@ -287,7 +287,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -287,7 +287,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager.isOsAccountVerified((err, data)=>{ AccountManager.isOsAccountVerified((err, data)=>{
console.debug("====>isOsAccountVerified err:" + JSON.stringify(err)); console.debug("====>isOsAccountVerified err:" + JSON.stringify(err));
console.debug("====>isOsAccountVerified data:" + data); console.debug("====>isOsAccountVerified data:" + data);
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(false); expect(data).assertEqual(false);
console.debug("====>ActsOsAccountVerified_0100 end===="); console.debug("====>ActsOsAccountVerified_0100 end====");
done(); done();
...@@ -321,7 +321,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -321,7 +321,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
console.debug("====>get os AccountManager finish===="); console.debug("====>get os AccountManager finish====");
AccountManager.isOsAccountVerified(0, (err, data)=>{ AccountManager.isOsAccountVerified(0, (err, data)=>{
console.debug("====>isOsAccountVerified err:" + JSON.stringify(err)); console.debug("====>isOsAccountVerified err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertFalse(); expect(data).assertFalse();
console.debug("====>ActsOsAccountIsVerified_0300 end===="); console.debug("====>ActsOsAccountIsVerified_0300 end====");
done(); done();
...@@ -356,7 +356,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -356,7 +356,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager.isOsAccountVerified(localIdStr, (err, data)=>{ AccountManager.isOsAccountVerified(localIdStr, (err, data)=>{
console.debug("====>error received callback===="); console.debug("====>error received callback====");
console.debug("====>receive isOsAccountVerified err: " + JSON.stringify(err)); console.debug("====>receive isOsAccountVerified err: " + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(false); expect(data).assertEqual(false);
console.debug("====>receive isOsAccountVerified data: " + JSON.stringify(data)); console.debug("====>receive isOsAccountVerified data: " + JSON.stringify(data));
done(); done();
...@@ -396,7 +396,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -396,7 +396,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
var localIdUndefined = undefined; var localIdUndefined = undefined;
AccountManager.isOsAccountVerified(localIdUndefined, (err, data) =>{ AccountManager.isOsAccountVerified(localIdUndefined, (err, data) =>{
console.debug("====>ActsOsAccountIsVerified_0700 isOsAccountVerified_err:" + JSON.stringify(err)) console.debug("====>ActsOsAccountIsVerified_0700 isOsAccountVerified_err:" + JSON.stringify(err))
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsOsAccountIsVerified_0700 isOsAccountVerified_data:" + JSON.stringify(data)) console.debug("====>ActsOsAccountIsVerified_0700 isOsAccountVerified_data:" + JSON.stringify(data))
expect(data).assertEqual(false) expect(data).assertEqual(false)
console.debug("====>ActsOsAccountIsVerified_0700 end===="); console.debug("====>ActsOsAccountIsVerified_0700 end====");
...@@ -477,7 +477,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () { ...@@ -477,7 +477,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager.isTestOsAccount((err, data)=>{ AccountManager.isTestOsAccount((err, data)=>{
console.debug("====>isTestOsAccount err:" + JSON.stringify(err)); console.debug("====>isTestOsAccount err:" + JSON.stringify(err));
console.debug("====>isTestOsAccount data:" + JSON.stringify(data)); console.debug("====>isTestOsAccount data:" + JSON.stringify(data));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(false); expect(data).assertEqual(false);
console.debug("====>ActsOsAccountIsTest_0100 end===="); console.debug("====>ActsOsAccountIsTest_0100 end====");
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册