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

!4975 【账号】错误返回值undefined改为null,接口属性部分补全

Merge pull request !4975 from 何海涛/0815UndefinedToNull
...@@ -31,10 +31,10 @@ export default function ActsAccountAddAccount() { ...@@ -31,10 +31,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -76,10 +76,10 @@ export default function ActsAccountAddAccount() { ...@@ -76,10 +76,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -121,13 +121,13 @@ export default function ActsAccountAddAccount() { ...@@ -121,13 +121,13 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -292,10 +292,10 @@ export default function ActsAccountAddAccount() { ...@@ -292,10 +292,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -373,10 +373,10 @@ export default function ActsAccountAddAccount() { ...@@ -373,10 +373,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -418,10 +418,10 @@ export default function ActsAccountAddAccount() { ...@@ -418,10 +418,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -463,10 +463,10 @@ export default function ActsAccountAddAccount() { ...@@ -463,10 +463,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -507,13 +507,13 @@ export default function ActsAccountAddAccount() { ...@@ -507,13 +507,13 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -558,10 +558,10 @@ export default function ActsAccountAddAccount() { ...@@ -558,10 +558,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
...@@ -609,10 +609,10 @@ export default function ActsAccountAddAccount() { ...@@ -609,10 +609,10 @@ export default function ActsAccountAddAccount() {
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();
}); });
......
...@@ -54,13 +54,13 @@ export default function ActsAccountAppAccess() { ...@@ -54,13 +54,13 @@ export default function ActsAccountAppAccess() {
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();
}); });
...@@ -105,13 +105,13 @@ export default function ActsAccountAppAccess() { ...@@ -105,13 +105,13 @@ export default function ActsAccountAppAccess() {
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();
}); });
...@@ -199,15 +199,16 @@ export default function ActsAccountAppAccess() { ...@@ -199,15 +199,16 @@ export default function ActsAccountAppAccess() {
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)=>{
expect(err).assertEqual(undefined) console.debug("====>disableAppAccess 0700 err:" + JSON.stringify(err));
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 +316,13 @@ export default function ActsAccountAppAccess() { ...@@ -315,13 +316,13 @@ export default function ActsAccountAppAccess() {
} }
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 +371,13 @@ export default function ActsAccountAppAccess() { ...@@ -370,13 +371,13 @@ export default function ActsAccountAppAccess() {
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 +423,12 @@ export default function ActsAccountAppAccess() { ...@@ -422,12 +423,12 @@ export default function ActsAccountAppAccess() {
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 +480,12 @@ export default function ActsAccountAppAccess() { ...@@ -479,12 +480,12 @@ export default function ActsAccountAppAccess() {
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();
}); });
......
...@@ -33,14 +33,14 @@ export default function ActsAccountAppAccess() { ...@@ -33,14 +33,14 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, 'test_extraInfo', (err)=>{ appAccountManager.addAccount(name, 'test_extraInfo', (err)=>{
console.debug("====>ActsAccountCheckAccountLabels_0100 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0100 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAccountLabels(name, owner, ['level4'], (err, data)=>{ appAccountManager.checkAccountLabels(name, owner, ['level4'], (err, data)=>{
console.debug("====>ActsAccountCheckAccountLabels_0100 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0100 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0100 data:" + JSON.stringify(data));
appAccountManager.deleteAccount(name, (err) =>{ appAccountManager.deleteAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0100 deleteAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0100 deleteAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0100 end===="); console.debug("====>ActsAccountCheckAccountLabels_0100 end====");
done(); done();
}) })
...@@ -61,14 +61,14 @@ export default function ActsAccountAppAccess() { ...@@ -61,14 +61,14 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountCheckAccountLabels_0200 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0200 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAccountLabels(name, owner, ['20-30'], (err, data)=>{ appAccountManager.checkAccountLabels(name, owner, ['20-30'], (err, data)=>{
console.debug("====>ActsAccountCheckAccountLabels_0200 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0200 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0200 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0200 data:" + JSON.stringify(data));
appAccountManager.deleteAccount(name, (err) =>{ appAccountManager.deleteAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0200 deleteAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0200 deleteAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0200 end===="); console.debug("====>ActsAccountCheckAccountLabels_0200 end====");
done(); done();
}) })
...@@ -88,15 +88,15 @@ export default function ActsAccountAppAccess() { ...@@ -88,15 +88,15 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount('CheckAccountLabels_0300', (err)=>{ appAccountManager.addAccount('CheckAccountLabels_0300', (err)=>{
console.debug("====>ActsAccountCheckAccountLabels_0300 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0300 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAccountLabels('CheckAccountLabels_0300', owner, ['male'], (err, data)=>{ appAccountManager.checkAccountLabels('CheckAccountLabels_0300', owner, ['male'], (err, data)=>{
console.debug("====>ActsAccountCheckAccountLabels_0300 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0300 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0300 data:" + JSON.stringify(data));
expect(data).assertEqual(false) expect(data).assertEqual(false)
appAccountManager.deleteAccount("CheckAccountLabels_0300", (err) =>{ appAccountManager.deleteAccount("CheckAccountLabels_0300", (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0300 deleteAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0300 deleteAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0300 end===="); console.debug("====>ActsAccountCheckAccountLabels_0300 end====");
done(); done();
}) })
...@@ -212,25 +212,25 @@ export default function ActsAccountAppAccess() { ...@@ -212,25 +212,25 @@ export default function ActsAccountAppAccess() {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountCheckAppAccess_0100 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAppAccess_0100 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccess(name, owner, (err, data)=>{ appAccountManager.checkAppAccess(name, owner, (err, data)=>{
console.debug("====>ActsAccountCheckAppAccess_0100 first_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAppAccess_0100 first_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAppAccess_0100 first_data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAppAccess_0100 first_data:" + JSON.stringify(data));
expect(data).assertEqual(false) expect(data).assertEqual(false)
appAccountManager.enableAppAccess(name, owner, (err, data) =>{ appAccountManager.enableAppAccess(name, owner, (err, data) =>{
console.debug("====>ActsAccountCheckAppAccess_0100 enableAppAccess_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAppAccess_0100 enableAppAccess_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccess(name, owner, (err, data) =>{ appAccountManager.checkAppAccess(name, owner, (err, data) =>{
console.debug("====>ActsAccountCheckAppAccess_0100 second_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAppAccess_0100 second_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(true) expect(data).assertEqual(true)
appAccountManager.disableAppAccess(name, owner, (err, data) =>{ appAccountManager.disableAppAccess(name, owner, (err, data) =>{
console.debug("====>ActsAccountCheckAppAccess_0100 disableAppAccount_err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAppAccess_0100 disableAppAccount_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.checkAppAccess(name, owner,(err, data)=>{ appAccountManager.checkAppAccess(name, owner,(err, data)=>{
console.debug("====>ActsAccountCheckAppAccess_0100 third_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAppAccess_0100 third_err:" + JSON.stringify(err))
expect(err).assertEqual(undefined) expect(err).assertEqual(null)
expect(data).assertEqual(false) expect(data).assertEqual(false)
try { try {
appAccountManager.deleteAccount(name) appAccountManager.deleteAccount(name)
...@@ -330,18 +330,18 @@ export default function ActsAccountAppAccess() { ...@@ -330,18 +330,18 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountDeleteAccountCredential_0100 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAccountCredential(name, "PIN", (err, data)=>{ appAccountManager.setAccountCredential(name, "PIN", (err, data)=>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 setAccountCredential_err:" + JSON.stringify(err)); console.debug("====>ActsAccountDeleteAccountCredential_0100 setAccountCredential_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountDeleteAccountCredential_0100 setAccountCredential_data:" + JSON.stringify(data)); console.debug("====>ActsAccountDeleteAccountCredential_0100 setAccountCredential_data:" + JSON.stringify(data));
appAccountManager.getAccountCredential(name, "PIN", (err) =>{ appAccountManager.getAccountCredential(name, "PIN", (err) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 getAccountCredential_err:" + JSON.stringify(err)) console.debug("====>ActsAccountDeleteAccountCredential_0100 getAccountCredential_err:" + JSON.stringify(err))
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountDeleteAccountCredential_0100 getAccountCredential_success:" + JSON.stringify(data)); console.debug("====>ActsAccountDeleteAccountCredential_0100 getAccountCredential_success:" + JSON.stringify(data));
appAccountManager.deleteAccountCredential(name, "PIN", (err, data)=>{ appAccountManager.deleteAccountCredential(name, "PIN", (err, data)=>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 deleteAccountCredential_err:" + JSON.stringify(err)); console.debug("====>ActsAccountDeleteAccountCredential_0100 deleteAccountCredential_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
expect(data).assertEqual(undefined); expect(data).assertEqual(undefined);
console.debug("====>ActsAccountDeleteAccountCredential_0100 deleteAccountCredential_data:" + JSON.stringify(data)); console.debug("====>ActsAccountDeleteAccountCredential_0100 deleteAccountCredential_data:" + JSON.stringify(data));
try{ try{
...@@ -371,14 +371,12 @@ export default function ActsAccountAppAccess() { ...@@ -371,14 +371,12 @@ export default function ActsAccountAppAccess() {
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount(name, 'test_extraInfo').then((data) =>{ appAccountManager.addAccount(name, 'test_extraInfo').then((data) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 add_account_success"); console.debug("====>ActsAccountDeleteAccountCredential_0200 add_account_success");
appAccountManager.setAccountCredential(name, "PIN").then((data) =>{ appAccountManager.setAccountCredential(name, "PIN").then(() =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 setAccountCredential_success"); console.debug("====>ActsAccountDeleteAccountCredential_0200 setAccountCredential_success");
expect(data).assertEqual(undefined);
appAccountManager.getAccountCredential(name, "PIN").then((data) =>{ appAccountManager.getAccountCredential(name, "PIN").then((data) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 getAccountCredential_data:" + JSON.stringify(data)); console.debug("====>ActsAccountDeleteAccountCredential_0200 getAccountCredential_data:" + JSON.stringify(data));
appAccountManager.deleteAccountCredential(name, "PIN").then((data) =>{ appAccountManager.deleteAccountCredential(name, "PIN").then((data) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 data:" + JSON.stringify(data)); console.debug("====>ActsAccountDeleteAccountCredential_0200 data:" + JSON.stringify(data));
expect(data).assertEqual(undefined); //expect undefined assertEqual true
try{ try{
appAccountManager.deleteAccount(name) appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountDeleteAccountCredential_0200 deleteAccount_success') console.debug('====>ActsAccountDeleteAccountCredential_0200 deleteAccount_success')
...@@ -423,7 +421,7 @@ export default function ActsAccountAppAccess() { ...@@ -423,7 +421,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountVerifyCredential_0100 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountVerifyCredential_0100 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.verifyCredential(name, owner, options, { appAccountManager.verifyCredential(name, owner, options, {
onResult:(resultCode, resultData)=>{ onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountVerifyCredential_0100 verifyCredential_resultcode:" + JSON.stringify(resultCode)); console.debug("====>ActsAccountVerifyCredential_0100 verifyCredential_resultcode:" + JSON.stringify(resultCode));
...@@ -461,9 +459,9 @@ export default function ActsAccountAppAccess() { ...@@ -461,9 +459,9 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountVerifyCredential_0200 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountVerifyCredential_0200 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
console.debug("====>ActsAccountVerifyCredential_0200 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountVerifyCredential_0200 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.verifyCredential(name, owner, { appAccountManager.verifyCredential(name, owner, {
onResult:(resultCode, resultData)=>{ onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountVerifyCredential_0200 verifyCredential_resultcode:" + JSON.stringify(resultCode)); console.debug("====>ActsAccountVerifyCredential_0200 verifyCredential_resultcode:" + JSON.stringify(resultCode));
...@@ -502,7 +500,7 @@ export default function ActsAccountAppAccess() { ...@@ -502,7 +500,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0100 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountSetAuthenticatorProperties_0100 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAuthenticatorProperties(owner, options, { appAccountManager.setAuthenticatorProperties(owner, options, {
onResult:(resultCode, resultData)=>{ onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0100 setAuthenticatorProperties_resultcode:" + JSON.stringify(resultCode)); console.debug("====>ActsAccountSetAuthenticatorProperties_0100 setAuthenticatorProperties_resultcode:" + JSON.stringify(resultCode));
...@@ -539,7 +537,7 @@ export default function ActsAccountAppAccess() { ...@@ -539,7 +537,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0200 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountSetAuthenticatorProperties_0200 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.setAuthenticatorProperties(owner, { appAccountManager.setAuthenticatorProperties(owner, {
onResult:(resultCode, resultData)=>{ onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0200 setAuthenticatorProperties_resultcode:" + JSON.stringify(resultCode)); console.debug("====>ActsAccountSetAuthenticatorProperties_0200 setAuthenticatorProperties_resultcode:" + JSON.stringify(resultCode));
...@@ -573,18 +571,19 @@ export default function ActsAccountAppAccess() { ...@@ -573,18 +571,19 @@ export default function ActsAccountAppAccess() {
it('ActsAccountSelectAccountByOptions_0100', 0, async function (done) { it('ActsAccountSelectAccountByOptions_0100', 0, async function (done) {
console.debug("====>ActsAccountSelectAccountByOptions_0100 start===="); console.debug("====>ActsAccountSelectAccountByOptions_0100 start====");
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
var select_options = {"allowedAccounts":[{"name":name,"owner":owner}]} var select_options = {allowedAccounts:[{"name":name,"owner":owner}]}
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, async (err)=>{
console.debug("====>ActsAccountSelectAccountByOptions_0100 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountSelectAccountByOptions_0100 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.selectAccountsByOptions(select_options, ((err, data)=>{ try {
console.debug("====>ActsAccountSelectAccountByOptions_0100 err:" + JSON.stringify(err)); var data = await appAccountManager.selectAccountsByOptions(select_options)
expect(err).assertEqual(undefined) console.debug("====>ActsAccountSelectAccountByOptions_0100 data:" + JSON.stringify(data));
console.debug("====>ActsAccountSelectAccountByOptions_0100 data:" + JSON.stringify(data.length)); expect(data.length).assertEqual(1)
expect(data.length).assertEqual(0) } catch(err) {
done(); onsole.debug("====>ActsAccountSelectAccountByOptions_0100 err:" + JSON.stringify(err));
})) expect(err).assertEqual(null)
}
try{ try{
appAccountManager.deleteAccount(name) appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountSelectAccountByOptions_0100 deleteAccount_success') console.debug('====>ActsAccountSelectAccountByOptions_0100 deleteAccount_success')
...@@ -593,6 +592,7 @@ export default function ActsAccountAppAccess() { ...@@ -593,6 +592,7 @@ export default function ActsAccountAppAccess() {
catch{ catch{
console.debug('====>ActsAccountSelectAccountByOptions_0100 deleteAccount_err') console.debug('====>ActsAccountSelectAccountByOptions_0100 deleteAccount_err')
expect().assertFail() expect().assertFail()
done();
} }
}); });
}); });
...@@ -606,20 +606,19 @@ export default function ActsAccountAppAccess() { ...@@ -606,20 +606,19 @@ export default function ActsAccountAppAccess() {
it('ActsAccountSelectAccountByOptions_0200', 0, async function (done) { it('ActsAccountSelectAccountByOptions_0200', 0, async function (done) {
console.debug("====>ActsAccountSelectAccountByOptions_0200 start===="); console.debug("====>ActsAccountSelectAccountByOptions_0200 start====");
var appAccountManager = account.createAppAccountManager(); var appAccountManager = account.createAppAccountManager();
var select_options = {"allowedOwners": [owner]} var select_options = {allowedOwners: [owner]}
console.debug("====>start finish===="); console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{ appAccountManager.addAccount(name, async (err)=>{
console.debug("====>ActsAccountSelectAccountByOptions_0200 add_account_err:" + JSON.stringify(err)); console.debug("====>ActsAccountSelectAccountByOptions_0200 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined); expect(err).assertEqual(null);
appAccountManager.selectAccountsByOptions(select_options).then((data)=>{ try {
console.debug("====>ActsAccountSelectAccountByOptions_0200 data:" + JSON.stringify(data.length)); var data = await appAccountManager.selectAccountsByOptions(select_options)
expect(data.length).assertEqual(0) console.debug("====>ActsAccountSelectAccountByOptions_0200 data:" + JSON.stringify(data));
done(); expect(data.length).assertEqual(3)
}).catch(()=>{ } catch(err) {
onsole.debug("====>ActsAccountSelectAccountByOptions_0200 err:" + JSON.stringify(err)); onsole.debug("====>ActsAccountSelectAccountByOptions_0200 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined) expect(err).assertEqual(null)
done() }
})
try{ try{
appAccountManager.deleteAccount(name) appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountSelectAccountByOptions_0200 deleteAccount_success') console.debug('====>ActsAccountSelectAccountByOptions_0200 deleteAccount_success')
...@@ -628,9 +627,46 @@ export default function ActsAccountAppAccess() { ...@@ -628,9 +627,46 @@ export default function ActsAccountAppAccess() {
catch{ catch{
console.debug('====>ActsAccountSelectAccountByOptions_0200 deleteAccount_err') console.debug('====>ActsAccountSelectAccountByOptions_0200 deleteAccount_err')
expect().assertFail() expect().assertFail()
done();
} }
}); });
}); });
/*
* @tc.number : ActsAccountSelectAccountByOptions_0100
* @tc.name : Verify Credential callback form
* @tc.desc :
*/
it('ActsAccountSelectAccountByOptions_0300', 0, async function (done) {
console.debug("====>ActsAccountSelectAccountByOptions_0300 start====");
var appAccountManager = account.createAppAccountManager();
var options = {requiredLabels: ["male", "30-40"]}
console.debug("====>start finish====");
appAccountManager.addAccount(name, async (err)=>{
console.debug("====>ActsAccountSelectAccountByOptions_0300 add_account_err:" + JSON.stringify(err));
expect(err).assertEqual(null);
try {
var data = await appAccountManager.selectAccountsByOptions(options)
console.debug("====>ActsAccountSelectAccountByOptions_0300 data:" + JSON.stringify(data));
expect(data.length).assertEqual(1)
} catch(err) {
onsole.debug("====>ActsAccountSelectAccountByOptions_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(null)
}
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountSelectAccountByOptions_0300 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountSelectAccountByOptions_0300 deleteAccount_err')
expect().assertFail()
done();
}
});
});
}) })
} }
\ No newline at end of file
...@@ -48,10 +48,10 @@ export default function ActsCreatAppAccountManager() { ...@@ -48,10 +48,10 @@ export default function ActsCreatAppAccountManager() {
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();
}); });
...@@ -72,18 +72,18 @@ export default function ActsCreatAppAccountManager() { ...@@ -72,18 +72,18 @@ export default function ActsCreatAppAccountManager() {
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();
}); });
......
...@@ -54,18 +54,18 @@ export default function ActsAccountCredential() { ...@@ -54,18 +54,18 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -125,21 +125,21 @@ export default function ActsAccountCredential() { ...@@ -125,21 +125,21 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -198,18 +198,18 @@ export default function ActsAccountCredential() { ...@@ -198,18 +198,18 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -252,13 +252,13 @@ export default function ActsAccountCredential() { ...@@ -252,13 +252,13 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -301,13 +301,13 @@ export default function ActsAccountCredential() { ...@@ -301,13 +301,13 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -351,18 +351,18 @@ export default function ActsAccountCredential() { ...@@ -351,18 +351,18 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -406,13 +406,13 @@ export default function ActsAccountCredential() { ...@@ -406,13 +406,13 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -455,13 +455,13 @@ export default function ActsAccountCredential() { ...@@ -455,13 +455,13 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -507,7 +507,7 @@ export default function ActsAccountCredential() { ...@@ -507,7 +507,7 @@ export default function ActsAccountCredential() {
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);
...@@ -515,7 +515,7 @@ export default function ActsAccountCredential() { ...@@ -515,7 +515,7 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -566,7 +566,7 @@ export default function ActsAccountCredential() { ...@@ -566,7 +566,7 @@ export default function ActsAccountCredential() {
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);
...@@ -574,7 +574,7 @@ export default function ActsAccountCredential() { ...@@ -574,7 +574,7 @@ export default function ActsAccountCredential() {
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();
}); });
...@@ -625,14 +625,14 @@ export default function ActsAccountCredential() { ...@@ -625,14 +625,14 @@ export default function ActsAccountCredential() {
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 @@ export default function ActsAccountDeleteAccount() { ...@@ -46,10 +46,10 @@ export default function ActsAccountDeleteAccount() {
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 @@ export default function ActsAccountDeleteAccount() { ...@@ -124,10 +124,10 @@ export default function ActsAccountDeleteAccount() {
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);
......
...@@ -54,15 +54,15 @@ export default function ActsAccountSetGetExtraInfo() { ...@@ -54,15 +54,15 @@ export default function ActsAccountSetGetExtraInfo() {
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();
}); });
...@@ -151,10 +151,10 @@ export default function ActsAccountSetGetExtraInfo() { ...@@ -151,10 +151,10 @@ export default function ActsAccountSetGetExtraInfo() {
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));
...@@ -204,15 +204,15 @@ export default function ActsAccountSetGetExtraInfo() { ...@@ -204,15 +204,15 @@ export default function ActsAccountSetGetExtraInfo() {
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();
}); });
...@@ -301,18 +301,18 @@ export default function ActsAccountSetGetExtraInfo() { ...@@ -301,18 +301,18 @@ export default function ActsAccountSetGetExtraInfo() {
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();
}); });
...@@ -361,17 +361,17 @@ export default function ActsAccountSetGetExtraInfo() { ...@@ -361,17 +361,17 @@ export default function ActsAccountSetGetExtraInfo() {
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));
...@@ -437,17 +437,17 @@ export default function ActsAccountSetGetExtraInfo() { ...@@ -437,17 +437,17 @@ export default function ActsAccountSetGetExtraInfo() {
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));
......
...@@ -46,13 +46,13 @@ export default function ActsAccountNoPermission() { ...@@ -46,13 +46,13 @@ export default function ActsAccountNoPermission() {
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(account.ResultCode.ERROR_PERMISSION_DENIED); expect(err.code).assertEqual(account.ResultCode.ERROR_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();
}); });
...@@ -96,13 +96,13 @@ export default function ActsAccountNoPermission() { ...@@ -96,13 +96,13 @@ export default function ActsAccountNoPermission() {
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(account.ResultCode.ERROR_PERMISSION_DENIED); expect(err.code).assertEqual(account.ResultCode.ERROR_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();
}); });
...@@ -145,13 +145,13 @@ export default function ActsAccountNoPermission() { ...@@ -145,13 +145,13 @@ export default function ActsAccountNoPermission() {
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(account.ResultCode.ERROR_PERMISSION_DENIED); expect(err.code).assertEqual(account.ResultCode.ERROR_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();
}) })
...@@ -195,13 +195,13 @@ export default function ActsAccountNoPermission() { ...@@ -195,13 +195,13 @@ export default function ActsAccountNoPermission() {
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).assertEqual(undefined); expect(err.code).assertEqual(account.ResultCode.ERROR_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();
}); });
...@@ -224,7 +224,7 @@ export default function ActsAccountNoPermission() { ...@@ -224,7 +224,7 @@ export default function ActsAccountNoPermission() {
console.debug("====>getAllAccounts 0800 start===="); console.debug("====>getAllAccounts 0800 start====");
try{ try{
var data = await appAccountManager.getAllAccounts(selfBundle); var data = await appAccountManager.getAllAccounts(selfBundle);
console.debug("====>getAll_promist_nopermission data:" + JSON.stringify(data)) console.debug("====>getAll_promise_nopermission data:" + JSON.stringify(data))
expect(data.length>0).assertEqual(true); expect(data.length>0).assertEqual(true);
done(); done();
} }
......
...@@ -68,12 +68,12 @@ export default function ActsAccountChangeOnOff() { ...@@ -68,12 +68,12 @@ export default function ActsAccountChangeOnOff() {
} }
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){
...@@ -136,7 +136,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -136,7 +136,7 @@ export default function ActsAccountChangeOnOff() {
} }
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){
...@@ -199,7 +199,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -199,7 +199,7 @@ export default function ActsAccountChangeOnOff() {
} }
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){
...@@ -266,7 +266,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -266,7 +266,7 @@ export default function ActsAccountChangeOnOff() {
} }
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,15 +325,14 @@ export default function ActsAccountChangeOnOff() { ...@@ -325,15 +325,14 @@ export default function ActsAccountChangeOnOff() {
console.debug("====>enableAppAccess ActsAccountChangeOnOff_0500 start"); console.debug("====>enableAppAccess ActsAccountChangeOnOff_0500 start");
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).assertEqual(0);
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));
...@@ -392,10 +391,10 @@ export default function ActsAccountChangeOnOff() { ...@@ -392,10 +391,10 @@ export default function ActsAccountChangeOnOff() {
} }
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();
}); });
} }
...@@ -459,7 +458,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -459,7 +458,7 @@ export default function ActsAccountChangeOnOff() {
} }
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){
...@@ -532,7 +531,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -532,7 +531,7 @@ export default function ActsAccountChangeOnOff() {
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();
}); });
...@@ -595,10 +594,10 @@ export default function ActsAccountChangeOnOff() { ...@@ -595,10 +594,10 @@ export default function ActsAccountChangeOnOff() {
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();
}); });
...@@ -672,7 +671,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -672,7 +671,7 @@ export default function ActsAccountChangeOnOff() {
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();
...@@ -753,7 +752,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -753,7 +752,7 @@ export default function ActsAccountChangeOnOff() {
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();
}); });
...@@ -794,7 +793,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -794,7 +793,7 @@ export default function ActsAccountChangeOnOff() {
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();
}); });
...@@ -861,7 +860,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -861,7 +860,7 @@ export default function ActsAccountChangeOnOff() {
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();
}); });
...@@ -908,7 +907,7 @@ export default function ActsAccountChangeOnOff() { ...@@ -908,7 +907,7 @@ export default function ActsAccountChangeOnOff() {
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();
}); });
......
...@@ -33,11 +33,11 @@ export default function ActsGetAllAccounts() { ...@@ -33,11 +33,11 @@ export default function ActsGetAllAccounts() {
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");
...@@ -49,7 +49,7 @@ export default function ActsGetAllAccounts() { ...@@ -49,7 +49,7 @@ export default function ActsGetAllAccounts() {
} }
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();
}); });
...@@ -122,7 +122,7 @@ export default function ActsGetAllAccounts() { ...@@ -122,7 +122,7 @@ export default function ActsGetAllAccounts() {
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();
...@@ -276,12 +276,12 @@ export default function ActsGetAllAccounts() { ...@@ -276,12 +276,12 @@ export default function ActsGetAllAccounts() {
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();
}); });
...@@ -374,7 +374,7 @@ export default function ActsGetAllAccounts() { ...@@ -374,7 +374,7 @@ export default function ActsGetAllAccounts() {
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====");
...@@ -480,20 +480,20 @@ export default function ActsGetAllAccounts() { ...@@ -480,20 +480,20 @@ export default function ActsGetAllAccounts() {
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();
...@@ -570,20 +570,20 @@ export default function ActsGetAllAccounts() { ...@@ -570,20 +570,20 @@ export default function ActsGetAllAccounts() {
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();
......
...@@ -54,15 +54,15 @@ export default function ActsSetCheckSyncEnable() { ...@@ -54,15 +54,15 @@ export default function ActsSetCheckSyncEnable() {
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();
}); });
...@@ -123,18 +123,18 @@ export default function ActsSetCheckSyncEnable() { ...@@ -123,18 +123,18 @@ export default function ActsSetCheckSyncEnable() {
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();
}); });
...@@ -198,18 +198,18 @@ export default function ActsSetCheckSyncEnable() { ...@@ -198,18 +198,18 @@ export default function ActsSetCheckSyncEnable() {
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();
}); });
...@@ -274,21 +274,21 @@ export default function ActsSetCheckSyncEnable() { ...@@ -274,21 +274,21 @@ export default function ActsSetCheckSyncEnable() {
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();
}); });
...@@ -350,21 +350,21 @@ export default function ActsSetCheckSyncEnable() { ...@@ -350,21 +350,21 @@ export default function ActsSetCheckSyncEnable() {
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();
}); });
...@@ -426,21 +426,21 @@ export default function ActsSetCheckSyncEnable() { ...@@ -426,21 +426,21 @@ export default function ActsSetCheckSyncEnable() {
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();
}); });
......
...@@ -34,7 +34,7 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -34,7 +34,7 @@ export default function ActsGetAllAccessibleAccounts() {
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();
...@@ -78,12 +78,12 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -78,12 +78,12 @@ export default function ActsGetAllAccessibleAccounts() {
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");
...@@ -96,7 +96,7 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -96,7 +96,7 @@ export default function ActsGetAllAccessibleAccounts() {
} }
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();
}) })
...@@ -167,18 +167,18 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -167,18 +167,18 @@ export default function ActsGetAllAccessibleAccounts() {
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");
...@@ -195,13 +195,13 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -195,13 +195,13 @@ export default function ActsGetAllAccessibleAccounts() {
} }
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();
}) })
...@@ -289,21 +289,21 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -289,21 +289,21 @@ export default function ActsGetAllAccessibleAccounts() {
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");
...@@ -318,10 +318,10 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -318,10 +318,10 @@ export default function ActsGetAllAccessibleAccounts() {
} }
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();
}) })
...@@ -408,15 +408,15 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -408,15 +408,15 @@ export default function ActsGetAllAccessibleAccounts() {
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");
...@@ -433,7 +433,7 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -433,7 +433,7 @@ export default function ActsGetAllAccessibleAccounts() {
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");
...@@ -448,10 +448,10 @@ export default function ActsGetAllAccessibleAccounts() { ...@@ -448,10 +448,10 @@ export default function ActsGetAllAccessibleAccounts() {
} }
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();
}) })
......
{ {
"description": "Configuration for hjunit demo Tests", "description": "Configuration for hjunit demo Tests"
} }
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
export default { export default {
onCreate() { onCreate() {
console.info("Application onCreate"); console.info("Application onCreate");
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
export default { export default {
data: { data: {
title: "Hello World" title: "Hello World"
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import account_appAccount from '@ohos.account.appAccount'; import account_appAccount from '@ohos.account.appAccount';
import {MyAuthenticator} from '../Common/utils' import {MyAuthenticator} from '../Common/utils'
...@@ -24,11 +23,11 @@ export default { ...@@ -24,11 +23,11 @@ export default {
var accountMgr = account_appAccount.createAppAccountManager(); var accountMgr = account_appAccount.createAppAccountManager();
try { try {
await accountMgr.addAccount("zhangsan", ""); await accountMgr.addAccount("zhangsan", "");
await accountMgr.enableAppAccess("zhangsan", "com.example.accounttest"); await accountMgr.enableAppAccess("zhangsan", "com.example.actsaccounttest");
await accountMgr.addAccount("lisi", ""); await accountMgr.addAccount("lisi", "");
await accountMgr.enableAppAccess("lisi", "com.example.accounttest"); await accountMgr.enableAppAccess("lisi", "com.example.actsaccounttest");
await accountMgr.addAccount("wangwu", ""); await accountMgr.addAccount("wangwu", "");
await accountMgr.enableAppAccess("wangwu", "com.example.accounttest"); await accountMgr.enableAppAccess("wangwu", "com.example.actsaccounttest");
} catch(err) { } catch(err) {
console.error(TAG + "addAccount or enableAppAccess failed, error: " + JSON.stringify(err)) console.error(TAG + "addAccount or enableAppAccess failed, error: " + JSON.stringify(err))
} }
......
...@@ -38,7 +38,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -38,7 +38,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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(testLocalId); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountGetIdFormUid_0100 end===="); console.debug("====>ActsOsAccountGetIdFormUid_0100 end====");
done(); done();
...@@ -80,7 +80,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -80,7 +80,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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); expect(localId).assertEqual(null);
console.debug("====>ActsOsAccountGetIdFormUid_0300 end===="); console.debug("====>ActsOsAccountGetIdFormUid_0300 end====");
done(); done();
}); });
...@@ -120,7 +120,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -120,7 +120,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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); expect(localId).assertEqual(null);
console.debug("====>ActsOsAccountGetIdFormUid_0500 end===="); console.debug("====>ActsOsAccountGetIdFormUid_0500 end====");
done(); done();
}); });
...@@ -162,7 +162,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -162,7 +162,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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(testLocalId); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountGetIdFormProcess_0100 end===="); console.debug("====>ActsOsAccountGetIdFormProcess_0100 end====");
done(); done();
...@@ -202,7 +202,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -202,7 +202,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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();
...@@ -238,7 +238,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -238,7 +238,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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);
...@@ -246,7 +246,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -246,7 +246,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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(testLocalId); expect(localId).assertEqual(testLocalId);
console.debug("====>ActsOsAccountLocalIdSerial_0100 end===="); console.debug("====>ActsOsAccountLocalIdSerial_0100 end====");
done(); done();
...@@ -289,7 +289,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -289,7 +289,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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);
...@@ -297,7 +297,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -297,7 +297,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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();
...@@ -341,21 +341,27 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -341,21 +341,27 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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.type.NORMAL).assertEqual(1);
expect(data.constraints.length > 0).assertEqual(true);
expect(data.isVerified).assertEqual(false);
expect(data.distributedInfo.name != null).assertEqual(true);
expect(data.domainInfo.domain == "").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();
}) })
...@@ -375,7 +381,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -375,7 +381,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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;
...@@ -404,38 +410,38 @@ export default function ActsOsAccountThirdPartyTest_third_2() { ...@@ -404,38 +410,38 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
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();
}) })
......
...@@ -43,7 +43,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -43,7 +43,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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();
...@@ -90,7 +90,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -90,7 +90,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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();
...@@ -246,7 +246,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -246,7 +246,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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();
...@@ -288,7 +288,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -288,7 +288,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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();
...@@ -322,7 +322,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -322,7 +322,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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();
...@@ -357,7 +357,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -357,7 +357,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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();
...@@ -397,7 +397,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -397,7 +397,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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====");
...@@ -478,7 +478,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { ...@@ -478,7 +478,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
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.
先完成此消息的编辑!
想要评论请 注册