Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d20b345c
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
d20b345c
编写于
8月 23, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4994 【OpenHarmony3.1Release】【账号】错误返回值undefined改为null,硬编码问题整改
Merge pull request !4994 from 何海涛/0816UndefinedToNull
上级
5aa1b7d6
1a01ef57
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
622 addition
and
641 deletion
+622
-641
account/appaccount/actsaccounttest/entry/src/main/js/test/AddAccount.test.js
...actsaccounttest/entry/src/main/js/test/AddAccount.test.js
+20
-20
account/appaccount/actsaccounttest/entry/src/main/js/test/AppAccess.test.js
.../actsaccounttest/entry/src/main/js/test/AppAccess.test.js
+16
-16
account/appaccount/actsaccounttest/entry/src/main/js/test/AssociatedData.test.js
...accounttest/entry/src/main/js/test/AssociatedData.test.js
+88
-88
account/appaccount/actsaccounttest/entry/src/main/js/test/CreatManager.test.js
...tsaccounttest/entry/src/main/js/test/CreatManager.test.js
+6
-6
account/appaccount/actsaccounttest/entry/src/main/js/test/Credential.test.js
...actsaccounttest/entry/src/main/js/test/Credential.test.js
+31
-31
account/appaccount/actsaccounttest/entry/src/main/js/test/DeleteAccount.test.js
...saccounttest/entry/src/main/js/test/DeleteAccount.test.js
+4
-4
account/appaccount/actsaccounttest/entry/src/main/js/test/ExtraInfo.test.js
.../actsaccounttest/entry/src/main/js/test/ExtraInfo.test.js
+20
-20
account/appaccount/actsaccounttest/entry/src/main/js/test/NoPermission.test.js
...tsaccounttest/entry/src/main/js/test/NoPermission.test.js
+8
-8
account/appaccount/actsaccounttest/entry/src/main/js/test/OAuthToken.test.js
...actsaccounttest/entry/src/main/js/test/OAuthToken.test.js
+291
-327
account/appaccount/actsaccounttest/entry/src/main/js/test/OnOff.js
...ppaccount/actsaccounttest/entry/src/main/js/test/OnOff.js
+17
-18
account/appaccount/actsgetallaccounts/entry/src/main/js/test/Getallaccounts.test.js
...allaccounts/entry/src/main/js/test/Getallaccounts.test.js
+15
-15
account/appaccount/actssetchecksyncenable/entry/src/main/js/test/Syncenable.test.js
...checksyncenable/entry/src/main/js/test/Syncenable.test.js
+26
-26
account/appaccount/getallaccessibleaccounts/actsgetallaccessibleaccounts/entry/src/main/js/test/Getallaccessible.test.js
...eaccounts/entry/src/main/js/test/Getallaccessible.test.js
+24
-24
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountGet.test.js
...hirdpartytest/entry/src/main/js/test/OsAccountGet.test.js
+48
-30
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountIs.test.js
...thirdpartytest/entry/src/main/js/test/OsAccountIs.test.js
+8
-8
未找到文件。
account/appaccount/actsaccounttest/entry/src/main/js/test/AddAccount.test.js
浏览文件 @
d20b345c
...
...
@@ -30,10 +30,10 @@ describe('ActsAccountAddAccount', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_0100 end====
"
);
done
();
});
...
...
@@ -75,10 +75,10 @@ describe('ActsAccountAddAccount', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_second
"
,
"
account_extraInfo_callback_second
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_0300 end====
"
);
done
();
});
...
...
@@ -120,13 +120,13 @@ describe('ActsAccountAddAccount', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_name_callback_third
"
,
"
account_extraInfo_callback_third
"
,
(
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
)
=>
{
console
.
debug
(
"
====>add account second time ActsAccountAddAccount_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_callback_third
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_0500 end====
"
);
done
();
});
...
...
@@ -291,10 +291,10 @@ describe('ActsAccountAddAccount', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_name_callback_seventh
"
,
""
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_1300 end====
"
);
done
();
});
...
...
@@ -372,10 +372,10 @@ describe('ActsAccountAddAccount', function () {
var
specialStr
=
"
#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890
"
;
appAccountManager
.
addAccount
(
specialStr
,
"
account_extraInfo_callback_ninth
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAddAccount_1700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
specialStr
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_1700 err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_1700 end====
"
);
done
();
});
...
...
@@ -417,10 +417,10 @@ describe('ActsAccountAddAccount', function () {
var
specialStr
=
"
"
;
appAccountManager
.
addAccount
(
"
account_name_callback_tenth
"
,
specialStr
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_1900 err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_1900 end====
"
);
done
();
});
...
...
@@ -462,10 +462,10 @@ describe('ActsAccountAddAccount', function () {
var
specialStr
=
"
#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890
"
;
appAccountManager
.
addAccount
(
"
account_extraInfo_callback_eleventh
"
,
specialStr
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_2100 err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_2100 end====
"
);
done
();
});
...
...
@@ -506,13 +506,13 @@ describe('ActsAccountAddAccount', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_name_callback_same
"
,
"
account_extraInfo_callback
"
,
(
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
)
=>
{
console
.
debug
(
"
====>add account second time ActsAccountAddAccount_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_callback_same
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_2300 end====
"
);
done
();
});
...
...
@@ -557,10 +557,10 @@ describe('ActsAccountAddAccount', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
limitName
,
"
account_extraInfo_callback
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAddAccount_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
limitName
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_2500 end====
"
);
done
();
});
...
...
@@ -608,10 +608,10 @@ describe('ActsAccountAddAccount', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_extra_callback_limit
"
,
limitExtra
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAddAccount_2700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAddAccount_2700 end====
"
);
done
();
});
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/AppAccess.test.js
浏览文件 @
d20b345c
...
...
@@ -53,13 +53,13 @@ describe('ActsAccountAppAccess', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
AppAccess_callback_itself
"
,
"
extrainfo_callback_itself
"
,
(
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
)
=>
{
console
.
debug
(
"
====>enableAppAccess err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
AppAccess_callback_itself
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAppAccess_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAppAccess_0100 end====
"
);
done
();
});
...
...
@@ -104,13 +104,13 @@ describe('ActsAccountAppAccess', function () {
var
nonExistBundle
=
"
com.example.NonExistentBundleCallback
"
;
appAccountManager
.
addAccount
(
"
AppAccess_callback_NotExistBundle
"
,
"
extrainfo_callback_NotExistBundle
"
,
(
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
)
=>
{
console
.
debug
(
"
====>enableAppAccess 0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
AppAccess_callback_NotExistBundle
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAppAccess_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAppAccess_0300 end====
"
);
done
();
});
...
...
@@ -198,16 +198,16 @@ describe('ActsAccountAppAccess', function () {
var
enableBundle
=
"
com.example.actsaccountsceneappaccess
"
;
appAccountManager
.
addAccount
(
"
AppAccess_callback_account
"
,
(
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
)
=>
{
console
.
debug
(
"
====>enableAppAccess 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
disableAppAccess
(
"
AppAccess_callback_account
"
,
enableBundle
,
(
err
)
=>
{
console
.
debug
(
"
====>disableAppAccess 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
null
)
appAccountManager
.
deleteAccount
(
"
AppAccess_callback_account
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAppAccess_0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAppAccess_0700 end====
"
);
done
();
});
...
...
@@ -315,13 +315,13 @@ describe('ActsAccountAppAccess', function () {
}
appAccountManager
.
addAccount
(
"
AppAccess_callback_bigBundleName
"
,
(
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
)
=>
{
console
.
debug
(
"
====>enableAppAccess 1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
AppAccess_callback_bigBundleName
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAppAccess_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAppAccess_1100 end====
"
);
done
();
});
...
...
@@ -370,13 +370,13 @@ describe('ActsAccountAppAccess', function () {
var
emptyBundleName
=
''
;
appAccountManager
.
addAccount
(
"
AppAccess_callback_emptyBundleName
"
,
(
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
)
=>
{
console
.
debug
(
"
====>enableAppAccess 1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
AppAccess_callback_emptyBundleName
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAppAccess_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAppAccess_1300 end====
"
);
done
();
});
...
...
@@ -422,12 +422,12 @@ describe('ActsAccountAppAccess', function () {
var
enableBundle
=
"
com.example.actsaccountsceneappaccess
"
;
appAccountManager
.
addAccount
(
"
AppAccess_callback_account
"
,
(
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
)
=>
{
expect
(
err
.
code
!=
0
).
assertEqual
(
true
)
appAccountManager
.
deleteAccount
(
"
AppAccess_callback_account
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAppAccess_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAppAccess_1500 end====
"
);
done
();
});
...
...
@@ -479,12 +479,12 @@ describe('ActsAccountAppAccess', function () {
var
notExistBundle
=
"
com.example.actsaccountnotexistbundle
"
;
appAccountManager
.
addAccount
(
"
AppAccess_callback_notExistBundle
"
,
(
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
)
=>
{
expect
(
err
.
code
!=
0
).
assertEqual
(
true
)
appAccountManager
.
deleteAccount
(
"
AppAccess_callback_notExistBundle
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAppAccess_1700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAppAccess_1700 end====
"
);
done
();
});
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/AssociatedData.test.js
100755 → 100644
浏览文件 @
d20b345c
...
...
@@ -53,18 +53,18 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0100
"
,(
err
)
=>
{
console
.
debug
(
"
====>add accountActsAccountAssociatedData_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_0100
"
,
"
key1
"
,
"
value1
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_0100
"
,
"
key1
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 0100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 0100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
value1
"
);
appAccountManager
.
deleteAccount
(
"
account_name_0100
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_0100 end====
"
);
done
();
});
...
...
@@ -125,32 +125,32 @@ describe('ActsAccountAssociatedData', function () {
done
();
});
/*
* @tc.number : ActsAccountAssociatedData_0300
* @tc.name : Get it directly without setting value
* @tc.desc : Call getAssociatedData directly to get value without calling setAssociatedData(callback)
*/
it
(
'
ActsAccountAssociatedData_0300
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsAccountAssociatedData_0300 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
getAssociatedData
(
"
account_name_0300
"
,
"
key3
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 0300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 0300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_name_0300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsAccountAssociatedData_0300 end====
"
);
done
();
/*
* @tc.number : ActsAccountAssociatedData_0300
* @tc.name : Get it directly without setting value
* @tc.desc : Call getAssociatedData directly to get value without calling setAssociatedData(callback)
*/
it
(
'
ActsAccountAssociatedData_0300
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsAccountAssociatedData_0300 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_0300
"
,
"
key3
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 0300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 0300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
account_name_0300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_0300 end====
"
);
done
();
});
});
});
});
});
/*
* @tc.number : ActsAccountAssociatedData_0400
...
...
@@ -205,17 +205,17 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0500
"
,(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_0500
"
,
"
key5
"
,
"
value5
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_0500
"
,
"
keyerr
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 0500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 0500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_0500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_0500 end====
"
);
done
();
});
...
...
@@ -277,21 +277,21 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0700
"
,(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_0700
"
,
"
key7
"
,
"
value7
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedDatafir first time 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_0700
"
,
"
key7
"
,
"
newvalue7
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedDatafir second time 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_0700
"
,
"
key7
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 0700 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 0700 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
newvalue7
"
);
appAccountManager
.
deleteAccount
(
"
account_name_0700
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_0700 end====
"
);
done
();
});
...
...
@@ -364,21 +364,21 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0900
"
,(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_0900
"
,
"
key9
"
,
"
value9
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData first time 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_0900
"
,
"
key9
"
,
"
value9
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData second time 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_0900
"
,
"
key9
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 0900 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
value9
"
);
appAccountManager
.
deleteAccount
(
"
account_name_0900
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_0900 end====
"
);
done
();
});
...
...
@@ -452,22 +452,22 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1100
"
,(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_1100
"
,
"
key11_first
"
,
"
value11_first
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData first time 1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_1100
"
,
"
key11_second
"
,
"
value11_second
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData second time 1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_1100
"
,
"
key11_first
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData key11_first 1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData key11_first 1100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
value11_first
"
);
appAccountManager
.
getAssociatedData
(
"
account_name_1100
"
,
"
key11_second
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData key11_second 1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData key11_second 1100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
value11_second
"
);
appAccountManager
.
deleteAccount
(
"
account_name_1100
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1100 err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -546,13 +546,13 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_1300
"
,
""
,
"
value13
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_1300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountAssociatedData_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_1300 end====
"
);
done
();
});
...
...
@@ -612,7 +612,7 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>1500 keyOverSize.length:
"
+
JSON
.
stringify
(
keyOverSize
.
length
));
expect
(
keyOverSize
.
length
).
assertEqual
(
1025
);
appAccountManager
.
setAssociatedData
(
"
account_name_1500
"
,
keyOverSize
,
"
value15
"
,
(
err
)
=>
{
...
...
@@ -620,7 +620,7 @@ describe('ActsAccountAssociatedData', function () {
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_1500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountAssociatedData_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_1500 end====
"
);
done
();
});
...
...
@@ -681,18 +681,18 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1700
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_1700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_1700
"
,
"
"
,
"
value17
"
,
(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountAssociatedData_1700 setAssociatedData:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_1700
"
,
"
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 1700 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 1700 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
value17
"
);
appAccountManager
.
deleteAccount
(
"
account_name_1700
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_1700 end====
"
);
done
();
});
...
...
@@ -754,18 +754,18 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1900
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_1900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_1900
"
,
"
key19
"
,
""
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_1900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_1900
"
,
"
key19
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 1900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 1900 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
""
);
appAccountManager
.
deleteAccount
(
"
account_name_1900
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_1900 end====
"
);
done
();
});
...
...
@@ -837,14 +837,14 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_2100
"
,(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_2100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
valueOverSize
.
length
).
assertEqual
(
1025
);
appAccountManager
.
setAssociatedData
(
"
account_name_2100
"
,
"
key21
"
,
valueOverSize
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_2100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_2100
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAssociatedData_2100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_2100 end====
"
);
done
();
});
...
...
@@ -904,18 +904,18 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_2300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
"
account_name_2300
"
,
"
key23
"
,
"
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAssociatedData
(
"
account_name_2300
"
,
"
key23
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 2300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 2300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
"
);
appAccountManager
.
deleteAccount
(
"
account_name_2300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_2300 end====
"
);
done
();
});
...
...
@@ -977,13 +977,13 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_2500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAssociatedData
(
""
,
"
key25
"
,
"
value25
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_2500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAssociatedData_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_2500 end====
"
);
done
();
});
...
...
@@ -1043,14 +1043,14 @@ describe('ActsAccountAssociatedData', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_2700
"
,(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_2700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
nameOverSize
.
length
).
assertEqual
(
1025
);
appAccountManager
.
setAssociatedData
(
nameOverSize
,
"
key27
"
,
"
value27
"
,
(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountAssociatedData_2700 setAssociatedData:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_2700
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountAssociatedData_2700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_2700 end====
"
);
done
();
});
...
...
@@ -1100,32 +1100,32 @@ describe('ActsAccountAssociatedData', function () {
}
});
/*
* @tc.number : ActsAccountAssociatedData_2900
* @tc.name : setAssociatedData and getAssociatedData are called when the argument is spaced
* @tc.desc : Call setAssociatedData and then getAssociatedData when the incoming name is a space(callback)
*/
it
(
'
ActsAccountAssociatedData_2900
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsAccountAssociatedData_2900 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
setAssociatedData
(
"
"
,
"
key29
"
,
"
value29
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_2900 err:
"
+
JSON
.
stringify
(
err
));
/*
* @tc.number : ActsAccountAssociatedData_2900
* @tc.name : setAssociatedData and getAssociatedData are called when the argument is spaced
* @tc.desc : Call setAssociatedData and then getAssociatedData when the incoming name is a space(callback)
*/
it
(
'
ActsAccountAssociatedData_2900
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsAccountAssociatedData_2900 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountAssociatedData_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
getAssociatedData
(
"
"
,
"
key29
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 2900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 2900 data:
"
+
JSON
.
stringify
(
data
));
appAccountManager
.
setAssociatedData
(
"
"
,
"
key29
"
,
"
value29
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAssociatedData ActsAccountAssociatedData_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsAccountAssociatedData_2900 end====
"
);
done
();
appAccountManager
.
getAssociatedData
(
"
"
,
"
key29
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAssociatedData 2900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAssociatedData 2900 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountAssociatedData_2900 end====
"
);
done
();
});
});
});
});
});
/*
* @tc.number : ActsAccountAssociatedData_3000
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/CreatManager.test.js
浏览文件 @
d20b345c
...
...
@@ -47,10 +47,10 @@ describe('ActsCreatAppAccountManager', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
creatappaccount_name_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsCreatAppAccountManager_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsCreatAppAccountManager_0100 end====
"
);
done
();
});
...
...
@@ -71,18 +71,18 @@ describe('ActsCreatAppAccountManager', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
creatappaccount_name_second
"
,
(
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
)
=>
{
console
.
debug
(
"
====>setAccountExtraInfo err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAccountExtraInfo
(
"
creatappaccount_name_second
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAccountExtraInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountExtraInfo data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
creatappaccount_extra
"
);
appAccountManagerTwo
.
deleteAccount
(
"
creatappaccount_name_second
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsCreatAppAccountManager_0200 end====
"
);
done
();
});
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/Credential.test.js
浏览文件 @
d20b345c
...
...
@@ -75,18 +75,18 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0100
"
,
(
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
)
=>
{
console
.
debug
(
"
====>ActsAccountCredential_0100 setAccountCredential:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAccountCredential
(
"
account_name_0100
"
,
"
credentialType1
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAccountCredential 0100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountCredential 0100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
credential1
"
);
appAccountManager
.
deleteAccount
(
"
account_name_0100
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_0100 end====
"
);
done
();
});
...
...
@@ -146,21 +146,21 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0300
"
,(
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
)
=>
{
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>getAccountCredential 0300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountCredential 0300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
newcredential3
"
);
appAccountManager
.
deleteAccount
(
"
account_name_0300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_0300 end====
"
);
done
();
});
...
...
@@ -219,18 +219,18 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0500
"
,(
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>getAccountCredential ActsAccountCredential_0500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountCredential ActsAccountCredential_0500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
""
);
appAccountManager
.
deleteAccount
(
"
account_name_0500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_0500 end====
"
);
done
();
});
...
...
@@ -273,13 +273,13 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0700
"
,
(
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
)
=>
{
console
.
debug
(
"
====>setAccountCredential ActsAccountCredential_0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_0700
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_0700 end====
"
);
done
();
});
...
...
@@ -322,13 +322,13 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_0900
"
,
(
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
)
=>
{
console
.
debug
(
"
====>getAccountCredential ActsAccountCredential_0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_0900
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_0900 end====
"
);
done
();
});
...
...
@@ -372,18 +372,18 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1100
"
,(
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
)
=>
{
console
.
debug
(
"
====>setAccountCredential ActsAccountCredential_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAccountCredential
(
"
account_name_1100
"
,
"
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAccountCredential 1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountCredential 1100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
credential11
"
);
appAccountManager
.
deleteAccount
(
"
account_name_1100
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_1100 end====
"
);
done
();
});
...
...
@@ -427,13 +427,13 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1300
"
,(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountCredential_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setAccountCredential
(
""
,
"
credentialType13
"
,
"
credential13
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setAccountCredential ActsAccountCredential_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_1300
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_1300 end====
"
);
done
();
});
...
...
@@ -476,13 +476,13 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1500
"
,
(
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
)
=>
{
console
.
debug
(
"
====>getAccountCredential ActsAccountCredential_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_1500
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_1500 end====
"
);
done
();
});
...
...
@@ -528,7 +528,7 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1700
"
,
(
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
)
=>
{
console
.
debug
(
"
====>CREDENTIALOVERSIZE.length:
"
+
JSON
.
stringify
(
CREDENTIALOVERSIZE
.
length
));
expect
(
CREDENTIALOVERSIZE
.
length
).
assertEqual
(
1025
);
...
...
@@ -536,7 +536,7 @@ describe('ActsAccountCredential', function () {
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_1700
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_1700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_1700 end====
"
);
done
();
});
...
...
@@ -587,7 +587,7 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_1900
"
,
(
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
)
=>
{
console
.
debug
(
"
====>CREDENTIALTYPEOVERSIZE.length:
"
+
JSON
.
stringify
(
CREDENTIALTYPEOVERSIZE
.
length
));
expect
(
CREDENTIALTYPEOVERSIZE
.
length
).
assertEqual
(
1025
);
...
...
@@ -595,7 +595,7 @@ describe('ActsAccountCredential', function () {
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_1900
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_1900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountCredential_1900 end====
"
);
done
();
});
...
...
@@ -646,14 +646,14 @@ describe('ActsAccountCredential', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_2100
"
,
(
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
)
=>
{
console
.
debug
(
"
====>setAccountCredential ActsAccountCredential_2100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_name_2100
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountCredential_2100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountCredential_2100 end====
"
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
done
();
});
});
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/DeleteAccount.test.js
浏览文件 @
d20b345c
...
...
@@ -46,10 +46,10 @@ describe('ActsAccountDeleteAccount', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
deleteAccount_name_callback_first
"
,
"
extraInfo_callback_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountDeleteAccount_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountDeleteAccount_0100 end====
"
);
done
();
});
...
...
@@ -124,10 +124,10 @@ describe('ActsAccountDeleteAccount', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
deleteAccount_name_callback_third
"
,
"
extraInfo_callback_third
"
,
(
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>delete Account second time err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/ExtraInfo.test.js
浏览文件 @
d20b345c
...
...
@@ -53,15 +53,15 @@ describe('ActsAccountSetGetExtraInfo', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_first
"
,
extraInfoStr
,
(
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
)
=>
{
console
.
debug
(
"
====>getAccountExtraInfo 0100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountExtraInfo 0100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
extraInfoStr
);
appAccountManager
.
deleteAccount
(
"
account_name_callback_first
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountSetGetExtraInfo_0100 end====
"
);
done
();
});
...
...
@@ -150,10 +150,10 @@ describe('ActsAccountSetGetExtraInfo', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_third
"
,
"
account_extrainfo_callback_third
"
,
(
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>getAccountExtraInfo 0500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountExtraInfo 0500 data:
"
+
JSON
.
stringify
(
data
));
...
...
@@ -203,15 +203,15 @@ describe('ActsAccountSetGetExtraInfo', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_fourth
"
,
(
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
)
=>
{
console
.
debug
(
"
====>getAccountExtraInfo 0700 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountExtraInfo 0700 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
""
);
appAccountManager
.
deleteAccount
(
"
account_name_callback_fourth
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountSetGetExtraInfo_0700 end====
"
);
done
();
});
...
...
@@ -300,18 +300,18 @@ describe('ActsAccountSetGetExtraInfo', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_sixth
"
,
"
account_extrainfo_callback_sixth
"
,(
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
)
=>
{
console
.
debug
(
"
====>setAccountExtraInfo 1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAccountExtraInfo
(
"
account_name_callback_sixth
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAccountExtraInfo 1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountExtraInfo 1100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
account_extra_sixth_twice
"
);
appAccountManager
.
deleteAccount
(
"
account_name_callback_sixth
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountSetGetExtraInfo_1100 end====
"
);
done
();
});
...
...
@@ -360,17 +360,17 @@ describe('ActsAccountSetGetExtraInfo', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_seventh
"
,(
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
)
=>
{
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>getAccountExtraInfo 1300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountExtraInfo 1300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
call_seventh_twice
"
);
appAccountManager
.
deleteAccount
(
"
account_name_callback_seventh
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1300 err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -436,17 +436,17 @@ describe('ActsAccountSetGetExtraInfo', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
account_name_callback_eighth
"
,(
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
)
=>
{
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>getAccountExtraInfo 1500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAccountExtraInfo 1500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
extra_callback_eighth
"
);
appAccountManager
.
deleteAccount
(
"
account_name_callback_eighth
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1500 err:
"
+
JSON
.
stringify
(
err
));
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/NoPermission.test.js
浏览文件 @
d20b345c
...
...
@@ -45,13 +45,13 @@ describe('ActsAccountNoPermission', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_setnopermission
"
,
(
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
)
=>
{
console
.
debug
(
"
====>setAppAccountSyncEnable 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_setnopermission
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountNoPermission_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountNoPermission_0100 end====
"
);
done
();
});
...
...
@@ -95,13 +95,13 @@ describe('ActsAccountNoPermission', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_checknopermission
"
,
(
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
)
=>
{
console
.
debug
(
"
====>checkAppAccountSyncEnable 0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_checknopermission
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountNoPermission_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountNoPermission_0300 end====
"
);
done
();
});
...
...
@@ -144,13 +144,13 @@ describe('ActsAccountNoPermission', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
accessibleAccount_callback_nopermission
"
,
(
err
)
=>
{
console
.
debug
(
"
====> add account ActsAccountNoPermission_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccessibleAccounts
((
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccessibleAccounts 0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED
);
appAccountManager
.
deleteAccount
(
"
accessibleAccount_callback_nopermission
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountNoPermission_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountNoPermission_0500 end====
"
);
done
();
})
...
...
@@ -194,13 +194,13 @@ describe('ActsAccountNoPermission', function () {
var
selfBundle
=
"
com.example.actsaccounttest
"
;
appAccountManager
.
addAccount
(
"
getAll_callback_nopermission
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED
);
appAccountManager
.
deleteAccount
(
"
getAll_callback_nopermission
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountNoPermission_0700 end====
"
);
done
();
});
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/OAuthToken.test.js
浏览文件 @
d20b345c
...
...
@@ -64,35 +64,35 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_tokenTest_name
"
,(
err
,)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType1
"
,
"
test_token1
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType1
"
,
"
test_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType1
"
,
"
other_app_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType2
"
,
"
test_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_tokenTest_name
"
,
OWNERSELF
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
ArrayData
.
length
).
assertEqual
(
2
);
appAccountManager
.
deleteOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType1
"
,
"
test_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 deleteOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_tokenTest_name
"
,
OWNERSELF
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
ArrayData
.
length
).
assertEqual
(
2
);
appAccountManager
.
deleteAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_9100 end====
"
);
done
();
appAccountManager
.
getOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
...
...
@@ -119,45 +119,45 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_tokenTest_name
"
,(
err
,)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
test_token
"
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
other_app_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_tokenTest_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
1
);
expect
(
dataArray
[
0
]).
assertEqual
(
"
other_app_bundleName
"
);
appAccountManager
.
deleteOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 deleteOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_tokenTest_name
"
,
OWNERSELF
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
ArrayData
.
length
).
assertEqual
(
1
);
expect
(
ArrayData
[
0
].
authType
).
assertEqual
(
"
authType
"
);
expect
(
ArrayData
[
0
].
token
).
assertEqual
(
""
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
OWNERSELF
,
false
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
expect
(
data
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_9000 end====
"
);
done
();
});
...
...
@@ -180,20 +180,20 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType1
"
,
"
test_token1
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType1
"
,
"
test_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType2
"
,
"
test_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_tokenTest_name
"
,
OWNERSELF
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
ArrayData
.
length
).
assertEqual
(
2
);
expect
(
ArrayData
[
0
].
authType
).
assertEqual
(
"
authType1
"
);
expect
(
ArrayData
[
0
].
token
).
assertEqual
(
"
test_token2
"
);
...
...
@@ -201,22 +201,21 @@ describe('ActsAccountOAuthToken', function () {
expect
(
ArrayData
[
1
].
token
).
assertEqual
(
"
test_token2
"
);
appAccountManager
.
deleteOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType1
"
,
"
test_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 deleteOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_tokenTest_name
"
,
OWNERSELF
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
ArrayData
.
length
).
assertEqual
(
1
);
expect
(
ArrayData
[
0
].
authType
).
assertEqual
(
"
authType2
"
);
expect
(
ArrayData
[
0
].
token
).
assertEqual
(
"
test_token2
"
);
appAccountManager
.
deleteAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsAccountOAuthToken_7100 end====
"
);
done
();
});
...
...
@@ -236,23 +235,23 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_tokenTest_name
"
,(
err
,)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
test_token
"
);
appAccountManager
.
getOAuthList
(
"
account_tokenTest_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_7200 end====
"
);
done
();
});
...
...
@@ -268,34 +267,34 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
test_token
"
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
OWNERSELF
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
true
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
OWNERSELF
,
false
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
OWNERSELF
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
true
);
appAccountManager
.
deleteOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 deleteOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_7300 end====
"
);
done
();
});
...
...
@@ -318,16 +317,16 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_7400 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_authType_limit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7400 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_authType_limit
"
,
"
authType
"
,
"
callback_authType_limit_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7400 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_authType_limit
"
,
OWNERSELF
,
limitAuthType
,
"
callback_authType_limit_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7400 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_authType_limit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7400 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_7400 end====
"
);
done
();
});
...
...
@@ -372,16 +371,16 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_7600 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_authType_limit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7600 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_authType_limit
"
,
limitAuthType
,
"
callback_authType_limit_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7600 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_authType_limit
"
,
OWNERSELF
,
limitAuthType
,
"
callback_authType_limit_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7600 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
account_callback_authType_limit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7600 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_7600 end====
"
);
done
();
});
...
...
@@ -418,21 +417,21 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_empty_authType
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_empty_authType
"
,
"
authType
"
,
"
callback_empty_authType_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_empty_authType
"
,
OWNERSELF
,
""
,
"
callback_empty_authType_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 deleteOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_empty_authType
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_empty_authType_token
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_empty_authType
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_7800 end====
"
);
done
();
});
...
...
@@ -468,24 +467,24 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_setSameAuthType
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setSameAuthType
"
,
"
authType
"
,
"
callback_setSameAuthType_token1
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setSameAuthType
"
,
"
authType
"
,
"
callback_setSameAuthType_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setSameAuthType
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setSameAuthType_token2
"
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_setSameAuthType
"
,
OWNERSELF
,
"
authType
"
,
"
callback_setSameAuthType_token1
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 deleteOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
account_callback_setSameAuthType
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8000 end====
"
);
done
();
});
...
...
@@ -527,7 +526,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8200 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8200 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
ArrayData
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8200 ====
"
);
done
();
});
...
...
@@ -541,7 +539,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8300 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8300 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
ArrayData
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8300 end====
"
);
done
();
});
...
...
@@ -555,15 +552,15 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8400 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
acount_no_setToken
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8400 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
acount_no_setToken
"
,
OWNERSELF
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8400 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8400 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
ArrayData
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
acount_no_setToken
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8400 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8400 end====
"
);
done
();
});
...
...
@@ -583,20 +580,20 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8500 addAccount start====
"
);
appAccountManager
.
addAccount
(
limitName
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8500 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
limitName
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8500 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
limitName
,
OWNERSELF
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8500 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8500 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
ArrayData
.
length
).
assertEqual
(
1
);
expect
(
ArrayData
[
0
].
authType
).
assertEqual
(
"
authType
"
);
expect
(
ArrayData
[
0
].
token
).
assertEqual
(
"
test_token
"
);
appAccountManager
.
deleteAccount
(
limitName
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8500 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8500 end====
"
);
done
();
});
...
...
@@ -616,15 +613,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8600 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8600 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_callback_getAllOAuthTokens_test
"
,
limitOwner
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8600 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8600 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
ArrayData
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8600 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8600 end====
"
);
done
();
});
...
...
@@ -639,15 +635,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8700 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8700 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_callback_getAllOAuthTokens_test
"
,
""
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8700 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8700 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
ArrayData
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8700 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8700 end====
"
);
done
();
});
...
...
@@ -662,15 +657,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8800 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8800 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_callback_getAllOAuthTokens_test
"
,
"
invalid_owner
"
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8800 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8800 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
ArrayData
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8800 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8800 end====
"
);
done
();
});
...
...
@@ -684,15 +678,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_8900 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8900 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllOAuthTokens
(
"
account_callback_getAllOAuthTokens_test
"
,
"
"
,(
err
,
ArrayData
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8900 getAllOAuthTokens err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_8900 getAllOAuthTokens ArrayData:
"
+
JSON
.
stringify
(
ArrayData
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
ArrayData
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_getAllOAuthTokens_test
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_8900 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_8900 end====
"
);
done
();
});
...
...
@@ -709,26 +702,26 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_normal
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_normal
"
,
"
authType
"
,
"
callback_normal_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_normal
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_normal_token
"
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_callback_normal
"
,
"
authType
"
,
OWNERSELF
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
true
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_normal
"
,
OWNERSELF
,
"
authType
"
,
"
callback_normal_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 deleteOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
account_callback_normal
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_0100 end====
"
);
done
();
});
...
...
@@ -772,15 +765,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_0300 getOAuthToken start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_noSetToken
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0300 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_noSetToken
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0300 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_0300 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_noSetToken
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0300 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_0300 end====
"
);
done
();
});
...
...
@@ -816,7 +808,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_0500 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_0500 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
done
();
});
});
...
...
@@ -843,29 +834,29 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_setSameAuthType
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setSameAuthType
"
,
"
authType
"
,
"
callback_setSameAuthType_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setSameAuthType
"
,
"
authType
"
,
"
callback_setSameAuthType_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setSameAuthType
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setSameAuthType_token
"
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setSameAuthType
"
,
"
authType
"
,
"
callback_setSameAuthType_DiffToken
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setSameAuthType
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setSameAuthType_DiffToken
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_setSameAuthType
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_0700 end====
"
);
done
();
});
...
...
@@ -910,26 +901,26 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_setDiff
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setDiff
"
,
"
authType1
"
,
"
callback_setDiff_token1
"
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setDiff
"
,
"
authType2
"
,
"
callback_setDiff_token2
"
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setDiff
"
,
OWNERSELF
,
"
authType1
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_0900 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setDiff_token1
"
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setDiff
"
,
OWNERSELF
,
"
authType2
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_0900 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setDiff_token2
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_setDiff
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_0900 end====
"
);
done
();
});
...
...
@@ -978,22 +969,22 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_setDeleteGet
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setDeleteGet
"
,
"
old_authType
"
,
"
callback_setDeleteGet_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setDeleteGet
"
,
"
new_authType
"
,
"
callback_setDeleteGet_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
old_authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1100 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setDeleteGet_token
"
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
new_authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1100 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setDeleteGet_token
"
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
old_authType
"
,
"
callback_setDeleteGet_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>deleteOAuthToken deleteOld ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -1001,11 +992,10 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1100 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
new_authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1100 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
callback_setDeleteGet_token
"
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
new_authType
"
,
"
callback_setDeleteGet_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>deleteOAuthToken deleteNew ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -1013,15 +1003,13 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1100 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
new_authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1100 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_setDeleteGet
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_1100 end====
"
);
done
();
});
...
...
@@ -1065,8 +1053,7 @@ describe('ActsAccountOAuthToken', function () {
}
catch
(
err
){
console
.
debug
(
"
====>deleteOAuthToken ActsAccountOAuthToken_1200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
}
expect
(
err
).
assertEqual
(
null
);
}
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1200 start====
"
);
try
{
...
...
@@ -1076,7 +1063,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1200 data:
"
+
data1_AfterDel
);
expect
(
data1_AfterDel
).
assertEqual
(
undefined
);
}
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1200 start====
"
);
try
{
...
...
@@ -1084,8 +1070,7 @@ describe('ActsAccountOAuthToken', function () {
}
catch
(
err
){
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1200 data:
"
+
data2_AfterDel
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1200 data:
"
+
data2_AfterDel
);
expect
(
data2_AfterDel
).
assertEqual
(
"
promise_setDeleteGet_token
"
);
}
console
.
debug
(
"
====>deleteOAuthToken deleteNew ActsAccountOAuthToken_1200 start====
"
);
...
...
@@ -1094,8 +1079,7 @@ describe('ActsAccountOAuthToken', function () {
}
catch
(
err
){
console
.
debug
(
"
====>deleteOAuthToken ActsAccountOAuthToken_1200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
}
expect
(
err
).
assertEqual
(
null
);
}
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1200 start====
"
);
try
{
...
...
@@ -1105,7 +1089,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
console
.
debug
(
"
====>getOAuthToken getOld ActsAccountOAuthToken_1200 data:
"
+
data1_AgainDel
);
expect
(
data1_AgainDel
).
assertEqual
(
undefined
);
}
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1200 start====
"
);
try
{
...
...
@@ -1115,7 +1098,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
console
.
debug
(
"
====>getOAuthToken getNew ActsAccountOAuthToken_1200 data:
"
+
data2_AgainDel
);
expect
(
data2_AgainDel
).
assertEqual
(
undefined
);
}
await
appAccountManager
.
deleteAccount
(
"
account_promise_setDeleteGet
"
);
console
.
debug
(
"
====>ActsAccountOAuthToken_1200 end====
"
);
...
...
@@ -1129,21 +1111,20 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_setDeleteGet
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setDeleteGet
"
,
"
authType
"
,
"
account_callback_setDeleteGet_token
"
,(
err
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setDeleteGet
"
,
"
authType
"
,
"
account_callback_setDeleteGet_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
authType
"
,
"
account_callback_setDeleteGet_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>deleteOAuthToken ActsAccountOAuthToken_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setDeleteGet
"
,
OWNERSELF
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1300 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_setDeleteGet
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_1300 end====
"
);
done
();
});
...
...
@@ -1240,17 +1221,16 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_repeatDelete
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_1900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_repeatDelete
"
,
OWNERSELF
,
"
aythType
"
,
"
promise_repeatDelete_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>deleteOAuthToken ActsAccountOAuthToken_1900 err:
"
+
JSON
.
stringify
(
err
));
appAccountManager
.
getOAuthToken
(
"
account_callback_repeatDelete
"
,
OWNERSELF
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_1900 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_repeatDelete
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_1900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_1900 end====
"
);
done
();
});
...
...
@@ -1289,27 +1269,25 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_repeatDelete
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_2100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_repeatDelete
"
,
"
authType
"
,
""
,(
err
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_repeatDelete
"
,
"
authType
"
,
""
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_repeatDelete
"
,
OWNERSELF
,
"
aythType
"
,
"
promise_repeatDelete_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>deleteOAuthToken first ActsAccountOAuthToken_2100 err:
"
+
JSON
.
stringify
(
err
));
appAccountManager
.
getOAuthToken
(
"
account_callback_repeatDelete
"
,
OWNERSELF
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken first ActsAccountOAuthToken_2100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken first ActsAccountOAuthToken_2100 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_repeatDelete
"
,
OWNERSELF
,
"
aythType
"
,
"
promise_repeatDelete_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>deleteOAuthToken second ActsAccountOAuthToken_2100 err:
"
+
JSON
.
stringify
(
err
));
appAccountManager
.
getOAuthToken
(
"
account_callback_repeatDelete
"
,
OWNERSELF
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken second ActsAccountOAuthToken_2100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken second ActsAccountOAuthToken_2100 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_repeatDelete
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_2100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_2100 end====
"
);
done
();
});
...
...
@@ -1354,18 +1332,17 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_setEmptyToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setEmptyToken
"
,
"
authType
"
,
""
,(
err
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_setEmptyToken
"
,
"
authType
"
,
""
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_setEmptyToken
"
,
OWNERSELF
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2300 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_setEmptyToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_2300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_2300 end====
"
);
done
();
});
...
...
@@ -1403,18 +1380,18 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_spaceToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_spaceToken
"
,
"
authType
"
,
"
"
,(
err
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_spaceToken
"
,
"
authType
"
,
"
"
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_spaceToken
"
,
OWNERSELF
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2500 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_spaceToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_2500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_2500 end====
"
);
done
();
});
...
...
@@ -1451,13 +1428,13 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_exceed_limitToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_2700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_exceed_limitToken
"
,
"
authType
"
,
limitToken
,(
err
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_exceed_limitToken
"
,
"
authType
"
,
limitToken
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_exceed_limitToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_2700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_2700 end====
"
);
done
();
});
...
...
@@ -1499,18 +1476,18 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_limitToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_limitToken
"
,
"
authType
"
,
limitToken
,(
err
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_limitToken
"
,
"
authType
"
,
limitToken
,(
err
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_limitToken
"
,
OWNERSELF
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_2900 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
limitToken
);
appAccountManager
.
deleteAccount
(
"
account_callback_limitToken
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_2900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_2900 end====
"
);
done
();
});
...
...
@@ -1550,13 +1527,13 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_limitAuthType
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_3100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_limitAuthType
"
,
limitAuthType
,
"
account_callback_limitAuthType_token
"
,(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_limitAuthType
"
,
limitAuthType
,
"
account_callback_limitAuthType_token
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_3100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_limitAuthType
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_3100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_3100 end====
"
);
done
();
});
...
...
@@ -1599,14 +1576,14 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_callback_limitAuthType
"
,
(
err
)
=>
{
console
.
debug
(
"
====>addAccount ActsAccountOAuthToken_3300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
getOAuthToken
(
"
account_callback_limitAuthType
"
,
"
com.example.actsaccounttest
"
,
limitAuthType
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_limitAuthType
"
,
"
com.example.actsaccounttest
"
,
limitAuthType
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_3300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_3300 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_limitAuthType
"
,
(
err
)
=>
{
console
.
debug
(
"
====>deleteAccount ActsAccountOAuthToken_3300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_3300 end====
"
);
done
();
});
...
...
@@ -1654,18 +1631,18 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_3500 create finish====
"
);
appAccountManager
.
addAccount
(
"
account_callback_limitAuthType
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountOAuthToken_3500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_limitAuthType
"
,
limitAuthType
,
"
account_callback_limitAuthType_token
"
,
(
err
)
=>
{
console
.
debug
(
"
====>setOAuthToken ActsAccountOAuthToken_3500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_limitAuthType
"
,
"
com.example.actsaccounttest
"
,
limitAuthType
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_3500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_3500 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
account_callback_limitAuthType_token
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_limitAuthType
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsAccountOAuthToken_3500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_3500 end====
"
);
done
();
});
...
...
@@ -1811,15 +1788,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_4700 create finish====
"
);
appAccountManager
.
addAccount
(
"
account_callback_invalid_owner
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account ActsAccountOAuthToken_4700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_invalid_owner
"
,
"
invalid_owner
"
,
"
authType
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_4700 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getOAuthToken ActsAccountOAuthToken_4700 data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_invalid_owner
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountOAuthToken_4700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_4700 end====
"
);
done
();
});
...
...
@@ -1855,18 +1831,18 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_3700 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_authType_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3700 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_authType_empty
"
,
""
,
"
account_callback_authType_empty_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_authType_empty
"
,
OWNERSELF
,
""
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3700 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_3700 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
account_callback_authType_empty_token
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_authType_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3700 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_3700 end====
"
);
done
();
});
...
...
@@ -1897,18 +1873,18 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_3900 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_authType_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3900 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_authType_space
"
,
"
"
,
"
account_callback_authType_space_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3900 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_authType_space
"
,
OWNERSELF
,
"
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3900 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_3900 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
account_callback_authType_space_token
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_authType_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_3900 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_3900 end====
"
);
done
();
});
...
...
@@ -1959,15 +1935,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_4900 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_owner_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_4900 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_owner_empty
"
,
""
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_4900 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_4900 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_owner_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_4900 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_4900 end====
"
);
done
();
});
...
...
@@ -2000,15 +1975,14 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_5100 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_owner_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_owner_space
"
,
"
"
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5100 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_5100 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_owner_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_5100 end====
"
);
done
();
});
...
...
@@ -2041,18 +2015,17 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_5300 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_authType_invalid
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5300 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_authType_invalid
"
,
"
authType
"
,
"
account_callback_authType_invalid_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5300 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_authType_invalid
"
,
OWNERSELF
,
"
invalid_authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5300 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_5300 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_authType_invalid
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5300 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_5300 end====
"
);
done
();
});
...
...
@@ -2088,18 +2061,17 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_5500 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_authType_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5500 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_authType_empty
"
,
"
authType
"
,
"
account_callback_authType_empty_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5500 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_authType_empty
"
,
OWNERSELF
,
""
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5500 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_5500 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_authType_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5500 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_5500 end====
"
);
done
();
});
...
...
@@ -2135,18 +2107,17 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_5700 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_authType_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5700 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_authType_space
"
,
"
authType
"
,
"
account_callback_authType_space_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_authType_space
"
,
OWNERSELF
,
"
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5700 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_5700 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
appAccountManager
.
deleteAccount
(
"
account_callback_authType_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5700 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_5700 end====
"
);
done
();
});
...
...
@@ -2182,16 +2153,16 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_5900 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_owner_invalid
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5900 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
appAccountManager
.
setOAuthToken
(
"
account_callback_owner_invalid
"
,
"
authType
"
,
"
account_callback_owner_invalid_token
"
,(
err
)
=>
{
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_owner_invalid
"
,
"
authType
"
,
"
account_callback_owner_invalid_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5900 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_owner_invalid
"
,
"
invalid_owner
"
,
"
authType
"
,
"
account_callback_owner_invalid_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5900 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_owner_invalid
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_5900 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_5900 end====
"
);
done
();
});
...
...
@@ -2227,16 +2198,16 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_6100 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_owner_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_owner_empty
"
,
"
authType
"
,
"
account_callback_owner_empty_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_owner_empty
"
,
""
,
"
authType
"
,
"
account_callback_owner_empty_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6100 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_owner_empty
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_6100 end====
"
);
done
();
});
...
...
@@ -2272,16 +2243,16 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_6300 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_owner_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6300 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_owner_space
"
,
"
authType
"
,
"
account_callback_owner_space_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6300 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_owner_space
"
,
"
"
,
"
authType
"
,
"
account_callback_owner_space_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6300 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_owner_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6300 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_6300 end====
"
);
done
();
});
...
...
@@ -2321,13 +2292,13 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_6500 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_token_exceedLimit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6500 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_token_exceedLimit
"
,
OWNERSELF
,
"
authType
"
,
limitToken
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6500 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_callback_token_exceedLimit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6500 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_6500 end====
"
);
done
();
});
...
...
@@ -2368,16 +2339,16 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_6700 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_token_limit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6700 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_token_limit
"
,
"
authType
"
,
limitToken
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_token_limit
"
,
OWNERSELF
,
"
authType
"
,
limitToken
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6700 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
account_callback_token_limit
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6700 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_6700 end====
"
);
done
();
});
...
...
@@ -2411,21 +2382,21 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 addAccount start====
"
);
appAccountManager
.
addAccount
(
"
account_callback_delete_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_callback_delete_space
"
,
"
authType
"
,
"
account_callback_delete_space_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteOAuthToken
(
"
account_callback_delete_space
"
,
OWNERSELF
,
"
authType
"
,
""
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_callback_delete_space
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 getOAuthToken data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
account_callback_delete_space_token
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_delete_space
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_6900 end====
"
);
done
();
});
...
...
@@ -2473,7 +2444,6 @@ describe('ActsAccountOAuthToken', function () {
appAccountManager
.
getAuthenticatorCallback
(
""
,(
err
,
databack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9300 getAuthenticatorCallback err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
databack
).
assertEqual
(
undefined
);
done
();
});
});
...
...
@@ -2484,7 +2454,6 @@ describe('ActsAccountOAuthToken', function () {
appAccountManager
.
getAuthenticatorCallback
(
"
"
,(
err
,
databack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9400 getAuthenticatorCallback err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
databack
).
assertEqual
(
undefined
);
done
();
});
});
...
...
@@ -2568,30 +2537,29 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
,)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9900 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_BundleName
"
,
true
).
then
(()
=>
{
appAccountManager
.
getOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9900 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_9900 getOAuthToken data:
"
+
data
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
data
).
assertEqual
(
undefined
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9900 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_9900 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
1
);
expect
(
dataArray
[
0
]).
assertEqual
(
"
test_BundleName
"
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_9900 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_9900 end====
"
);
done
();
});
});
});
}).
catch
((
err
)
=>
{
expect
(
err
).
assertEqual
(
undefined
);
done
();
expect
(
err
).
assertEqual
(
null
);
done
();
})
});
});
...
...
@@ -2601,21 +2569,21 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
,)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10000 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10000 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_BundleName
"
,
""
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10000 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10000 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10000 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10000 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10000 end====
"
);
done
();
});
...
...
@@ -2630,21 +2598,21 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_BundleName
"
,
"
invalid_string
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10100 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10100 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10100 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10100 end====
"
);
done
();
});
...
...
@@ -2659,16 +2627,16 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10200 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10200 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
""
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10200 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10200 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10200 end====
"
);
done
();
});
...
...
@@ -2682,22 +2650,22 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10300 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10300 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10300 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10300 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10300 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
1
);
expect
(
dataArray
[
0
]).
assertEqual
(
"
"
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10300 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10300 end====
"
);
done
();
});
...
...
@@ -2716,16 +2684,16 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10400 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10400 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
limitBundleName
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10400 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10400 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10400 end====
"
);
done
();
});
...
...
@@ -2739,27 +2707,27 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
""
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
""
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
1
);
expect
(
dataArray
[
0
]).
assertEqual
(
"
test_bundleName
"
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 getOAuthList authType:
\"
authType
\"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 getOAuthList authType:
\"
authType
\"
dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10500 end====
"
);
done
();
});
...
...
@@ -2775,27 +2743,27 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
"
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
1
);
expect
(
dataArray
[
0
]).
assertEqual
(
"
test_bundleName
"
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 getOAuthList authType:
\"
authType
\"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 getOAuthList authType:
\"
authType
\"
dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10600 end====
"
);
done
();
});
...
...
@@ -2816,21 +2784,21 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10700 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
limitAuthType
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10700 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10700 getOAuthList authType:
\"
authType
\"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10700 getOAuthList authType:
\"
authType
\"
dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10700 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10700 end====
"
);
done
();
});
...
...
@@ -2845,27 +2813,27 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_setOAuthTokenVisibility_name
"
,
"
invalid_authType
"
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
invalid_authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
1
);
expect
(
dataArray
[
0
]).
assertEqual
(
"
test_bundleName
"
);
appAccountManager
.
getOAuthList
(
"
account_setOAuthTokenVisibility_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 getOAuthList authType:
\"
authType
\"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 getOAuthList authType:
\"
authType
\"
dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_setOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_10800 end====
"
);
done
();
});
...
...
@@ -2969,23 +2937,23 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
""
,
"
test_bundleName
"
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
false
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
""
,
OWNERSELF
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_11700 end====
"
);
done
();
});
...
...
@@ -3000,23 +2968,23 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
"
"
,
"
test_bundleName
"
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
false
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
"
"
,
OWNERSELF
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_11800 end====
"
);
done
();
});
...
...
@@ -3035,10 +3003,10 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11900 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11900 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
limitAuthType
,
"
test_bundleName
"
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11900 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
...
...
@@ -3047,7 +3015,7 @@ describe('ActsAccountOAuthToken', function () {
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_11900 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_11900 end====
"
);
done
();
});
...
...
@@ -3062,23 +3030,23 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
"
invalid_authType
"
,
"
test_bundleName
"
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
false
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
"
invalid_authType
"
,
OWNERSELF
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12000 end====
"
);
done
();
});
...
...
@@ -3093,17 +3061,17 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
""
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12100 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_12100 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12100 end====
"
);
done
();
});
...
...
@@ -3117,18 +3085,18 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12200 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12200 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
"
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12200 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_12200 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
false
);
appAccountManager
.
deleteAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12200 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12200 end====
"
);
done
();
});
...
...
@@ -3146,17 +3114,17 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12300 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12300 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_checkOAuthTokenVisibility_name
"
,
"
authType
"
,
limitBundleName
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12300 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_12300 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
account_checkOAuthTokenVisibility_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12300 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12300 end====
"
);
done
();
});
...
...
@@ -3170,21 +3138,21 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_testGetOAuthList_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12400 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_testGetOAuthList_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12400 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_testGetOAuthList_name
"
,
"
authType
"
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12400 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_testGetOAuthList_name
"
,
""
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12400 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12400 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_testGetOAuthList_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12400 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12400 end====
"
);
done
();
});
...
...
@@ -3199,21 +3167,21 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_testGetOAuthList_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12500 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_testGetOAuthList_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12500 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_testGetOAuthList_name
"
,
"
authType
"
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12500 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_testGetOAuthList_name
"
,
"
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12500 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12500 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
deleteAccount
(
"
account_testGetOAuthList_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12500 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12500 end====
"
);
done
();
});
...
...
@@ -3232,21 +3200,20 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_testGetOAuthList_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_testGetOAuthList_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_testGetOAuthList_name
"
,
"
authType
"
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthList
(
"
account_testGetOAuthList_name
"
,
limitAuthType
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
dataArray
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
appAccountManager
.
deleteAccount
(
"
account_testGetOAuthList_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_12600 end====
"
);
done
();
});
...
...
@@ -3275,8 +3242,7 @@ describe('ActsAccountOAuthToken', function () {
appAccountManager
.
getOAuthList
(
"
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_12800 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_12800 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
dataArray
).
assertEqual
(
undefined
);
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
done
();
});
});
...
...
@@ -3292,7 +3258,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_12900 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_12900 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
dataArray
).
assertEqual
(
undefined
);
done
();
});
});
...
...
@@ -3304,7 +3269,6 @@ describe('ActsAccountOAuthToken', function () {
console
.
debug
(
"
====>ActsAccountOAuthToken_13000 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_13000 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
err
.
code
!=
0
).
assertEqual
(
true
);
expect
(
dataArray
).
assertEqual
(
undefined
);
done
();
});
});
...
...
@@ -3314,42 +3278,42 @@ describe('ActsAccountOAuthToken', function () {
var
appAccountManager
=
account
.
createAppAccountManager
();
appAccountManager
.
addAccount
(
"
account_tokenTest_name
"
,(
err
,)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 addAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
setOAuthToken
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
test_token
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 setOAuthToken err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getOAuthToken
(
"
account_tokenTest_name
"
,
OWNERSELF
,
"
authType
"
,(
err
,
data
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 getOAuthToken err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 getOAuthToken stateBack:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
"
test_token
"
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
test_bundleName
"
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
false
);
appAccountManager
.
getOAuthList
(
"
account_tokenTest_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
dataArray
.
length
).
assertEqual
(
0
);
appAccountManager
.
setOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
test_bundleName
"
,
true
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 setOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkOAuthTokenVisibility
(
"
account_tokenTest_name
"
,
"
authType
"
,
"
test_bundleName
"
,(
err
,
stateBack
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 checkOAuthTokenVisibility err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 checkOAuthTokenVisibility stateBack:
"
+
stateBack
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
stateBack
).
assertEqual
(
true
);
appAccountManager
.
getOAuthList
(
"
account_tokenTest_name
"
,
"
authType
"
,(
err
,
dataArray
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 getOAuthList err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 getOAuthList dataArray:
"
+
JSON
.
stringify
(
dataArray
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
dataArray
.
length
).
assertEqual
(
1
);
expect
(
dataArray
[
0
]).
assertEqual
(
"
test_bundleName
"
);
appAccountManager
.
deleteAccount
(
"
account_tokenTest_name
"
,(
err
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 deleteAccount err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountOAuthToken_13100 end====
"
);
done
();
});
...
...
@@ -3369,8 +3333,8 @@ describe('ActsAccountOAuthToken', function () {
appAccountManager
.
getAuthenticatorInfo
(
"
com.example.actsaccountOauthtoken
"
,(
err
,
dataInfo
)
=>
{
console
.
debug
(
"
====>ActsAccountOAuthToken_13200 getAuthenticatorInfo err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ActsAccountOAuthToken_13200 getAuthenticatorInfo dataInfo:
"
+
JSON
.
stringify
(
dataInfo
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
isNaN
(
dataInfo
.
iconId
)).
assertFalse
();
expect
(
err
).
assertEqual
(
null
);
expect
(
isNaN
(
dataInfo
.
iconId
)).
assertFalse
();
expect
(
isNaN
(
dataInfo
.
labelId
)).
assertFalse
();
done
();
});
...
...
account/appaccount/actsaccounttest/entry/src/main/js/test/OnOff.js
100755 → 100644
浏览文件 @
d20b345c
...
...
@@ -67,12 +67,12 @@ describe('ActsAccountChangeOnOff', async function () {
}
function
deleteAccountCallback
(
err
){
console
.
debug
(
"
====>delete account 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
disCallback
(
err
){
console
.
debug
(
"
====>delete account 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
changeonoff_extra
"
,
deleteAccountCallback
);
}
function
subscriberCallback
(
err
,
data
){
...
...
@@ -135,7 +135,7 @@ describe('ActsAccountChangeOnOff', async function () {
}
function
deleteAccountCallback
(
err
){
console
.
debug
(
"
====>delete account 0200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
...
...
@@ -198,7 +198,7 @@ describe('ActsAccountChangeOnOff', async function () {
}
function
deleteAccountCallback
(
err
){
console
.
debug
(
"
====>delete account 0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
...
...
@@ -265,7 +265,7 @@ describe('ActsAccountChangeOnOff', async function () {
}
function
deleteAccountCallback
(
err
){
console
.
debug
(
"
====>delete account 0400 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
...
...
@@ -325,14 +325,13 @@ describe('ActsAccountChangeOnOff', async function () {
await
appAccountManager
.
enableAppAccess
(
"
onoff_delete
"
,
"
com.example.actsaccountsceneonoff
"
);
function
unSubscriberCallback
(
err
){
console
.
debug
(
"
====>unsubscribe 0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
==
0
).
assertEqual
(
true
);
done
();
}
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_delete
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
done
();
}
function
publishCallback
(
err
){
console
.
debug
(
"
====>publish call back err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -391,10 +390,10 @@ describe('ActsAccountChangeOnOff', async function () {
}
function
deleteAccountCallback
(
err
){
console
.
debug
(
"
====>delete first account 0600 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
onoff_enableSec
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete second account 0600 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
done
();
});
}
...
...
@@ -458,7 +457,7 @@ describe('ActsAccountChangeOnOff', async function () {
}
function
deleteAccountCallback
(
err
){
console
.
debug
(
"
====>delete account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
...
...
@@ -531,7 +530,7 @@ describe('ActsAccountChangeOnOff', async function () {
console
.
debug
(
"
====>off ActsAccountChangeOnOff_0800 finish====
"
);
appAccountManager
.
deleteAccount
(
"
onoff_self
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountChangeOnOff_0800 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountChangeOnOff_0800 end====
"
);
done
();
});
...
...
@@ -594,10 +593,10 @@ describe('ActsAccountChangeOnOff', async function () {
console
.
debug
(
"
====>off ActsAccountChangeOnOff_0900 finish====
"
);
appAccountManager
.
deleteAccount
(
"
onoff_self_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete second account 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountChangeOnOff_0900 end====
"
);
done
();
});
...
...
@@ -671,7 +670,7 @@ describe('ActsAccountChangeOnOff', async function () {
console
.
debug
(
"
====>off ActsAccountChangeOnOff_1000 finish====
"
);
appAccountManager
.
deleteAccount
(
"
onoff_twice
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountChangeOnOff_1000 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
twiceSign
).
assertEqual
(
2
);
console
.
debug
(
"
====>ActsAccountChangeOnOff_1000 end====
"
);
done
();
...
...
@@ -752,7 +751,7 @@ describe('ActsAccountChangeOnOff', async function () {
console
.
debug
(
"
====>off ActsAccountChangeOnOff_1100 finish====
"
);
appAccountManager
.
deleteAccount
(
"
onoff_same
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountChangeOnOff_1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountChangeOnOff_1100 end====
"
);
done
();
});
...
...
@@ -793,7 +792,7 @@ describe('ActsAccountChangeOnOff', async function () {
console
.
debug
(
"
====>delete account 1200 start====
"
);
appAccountManager
.
deleteAccount
(
"
onoff_repeatoff
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountChangeOnOff_1200 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountChangeOnOff_1200 end====
"
);
done
();
});
...
...
@@ -860,7 +859,7 @@ describe('ActsAccountChangeOnOff', async function () {
console
.
debug
(
"
====>delete account 1300 start====
"
);
appAccountManager
.
deleteAccount
(
"
onoff_same
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountChangeOnOff_1300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountChangeOnOff_1300 end====
"
);
done
();
});
...
...
@@ -907,7 +906,7 @@ describe('ActsAccountChangeOnOff', async function () {
console
.
debug
(
"
====>delete account 1400 start====
"
);
appAccountManager
.
deleteAccount
(
"
onoff_same
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account ActsAccountChangeOnOff_1400 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsAccountChangeOnOff_1400 end====
"
);
done
();
});
...
...
account/appaccount/actsgetallaccounts/entry/src/main/js/test/Getallaccounts.test.js
浏览文件 @
d20b345c
...
...
@@ -32,11 +32,11 @@ describe('ActsGetAllAccounts', function () {
var
selfBundle
=
"
com.example.actsgetallaaccounts
"
;
appAccountManager
.
addAccount
(
"
Account_this_application_callback
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 0100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccounts 0100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
try
{
expect
(
data
[
0
].
name
).
assertEqual
(
"
Account_this_application_callback
"
);
expect
(
data
[
0
].
owner
).
assertEqual
(
"
com.example.actsgetallaaccounts
"
);
...
...
@@ -48,7 +48,7 @@ describe('ActsGetAllAccounts', function () {
}
appAccountManager
.
deleteAccount
(
"
Account_this_application_callback
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account 0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsGetAllAccounts_0100 end====
"
);
done
();
});
...
...
@@ -121,7 +121,7 @@ describe('ActsGetAllAccounts', function () {
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 0300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccounts 0300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsGetAllAccounts_0300 end====
"
);
done
();
...
...
@@ -275,12 +275,12 @@ describe('ActsGetAllAccounts', function () {
function
getAllCallback
(
err
,
data
){
console
.
debug
(
"
====>getAllAccounts 0900 err:
"
+
JSON
.
stringify
(
err
));
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
].
owner
).
assertEqual
(
"
com.example.actsgetallaaccounts
"
);
appAccountManager
.
deleteAccount
(
"
Account_application_callback
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsGetAllAccounts_0900 end====
"
);
done
();
});
...
...
@@ -373,7 +373,7 @@ describe('ActsGetAllAccounts', function () {
function
getAllCallback
(
err
,
data
){
console
.
debug
(
"
====>getAllAccounts 1100 err:
"
+
JSON
.
stringify
(
err
));
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
].
owner
).
assertEqual
(
"
com.example.actsscenegetallaccounts
"
);
console
.
debug
(
"
====>ActsGetAllAccounts_1100 end====
"
);
...
...
@@ -479,20 +479,20 @@ describe('ActsGetAllAccounts', function () {
var
selfBundle
=
"
com.example.actsgetallaaccounts
"
;
appAccountManager
.
addAccount
(
"
account_callback_delete
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account 1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 1500 err:
"
+
JSON
.
stringify
(
err
));
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
].
owner
).
assertEqual
(
"
com.example.actsgetallaaccounts
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_delete
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account 1500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 1500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccounts 1500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsGetAllAccounts_1500 end====
"
);
done
();
...
...
@@ -569,20 +569,20 @@ describe('ActsGetAllAccounts', function () {
var
selfBundle
=
"
com.example.actsgetallaaccounts
"
;
appAccountManager
.
addAccount
(
"
account_callback_additional
"
,
"
account_extrainfo
"
,
(
err
)
=>
{
console
.
debug
(
"
====>add account 1700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 1700 err:
"
+
JSON
.
stringify
(
err
));
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
].
owner
).
assertEqual
(
"
com.example.actsgetallaaccounts
"
);
appAccountManager
.
deleteAccount
(
"
account_callback_additional
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete account 1700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccounts
(
selfBundle
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccounts 1700 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccounts 1700 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsGetAllAccounts_1700 end====
"
);
done
();
...
...
account/appaccount/actssetchecksyncenable/entry/src/main/js/test/Syncenable.test.js
浏览文件 @
d20b345c
...
...
@@ -53,15 +53,15 @@ describe('ActsSetCheckSyncEnable', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_notset
"
,
(
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
)
=>
{
console
.
debug
(
"
====>checkAppAccountSyncEnable 0100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>checkAppAccountSyncEnable 0100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
false
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_notset
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsSetCheckSyncEnable_0100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsSetCheckSyncEnable_0100 end====
"
);
done
();
});
...
...
@@ -122,18 +122,18 @@ describe('ActsSetCheckSyncEnable', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_settrue
"
,
(
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
)
=>
{
console
.
debug
(
"
====>setAppAccountSyncEnable 0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkAppAccountSyncEnable
(
"
syncenable_callback_settrue
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>checkAppAccountSyncEnable 0300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>checkAppAccountSyncEnable 0300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_settrue
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsSetCheckSyncEnable_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsSetCheckSyncEnable_0300 end====
"
);
done
();
});
...
...
@@ -197,18 +197,18 @@ describe('ActsSetCheckSyncEnable', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_setfalse
"
,
(
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
)
=>
{
console
.
debug
(
"
====>setAppAccountSyncEnable 0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
checkAppAccountSyncEnable
(
"
syncenable_callback_setfalse
"
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>checkAppAccountSyncEnable 0500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>checkAppAccountSyncEnable 0500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
false
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_setfalse
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsSetCheckSyncEnable_0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsSetCheckSyncEnable_0500 end====
"
);
done
();
});
...
...
@@ -273,21 +273,21 @@ describe('ActsSetCheckSyncEnable', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_falsetrue
"
,
(
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
)
=>
{
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>checkAppAccountSyncEnable 0700 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>checkAppAccountSyncEnable 0700 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_falsetrue
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsSetCheckSyncEnable_0700 end====
"
);
done
();
});
...
...
@@ -349,21 +349,21 @@ describe('ActsSetCheckSyncEnable', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_falsetrue
"
,
(
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
)
=>
{
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>checkAppAccountSyncEnable 0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>checkAppAccountSyncEnable 0900 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
false
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_falsetrue
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsSetCheckSyncEnable_0900 end====
"
);
done
();
});
...
...
@@ -425,21 +425,21 @@ describe('ActsSetCheckSyncEnable', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
syncenable_callback_truetrue
"
,
(
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
)
=>
{
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>checkAppAccountSyncEnable 1100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>checkAppAccountSyncEnable 1100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
true
);
appAccountManager
.
deleteAccount
(
"
syncenable_callback_truetrue
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account 1100 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsSetCheckSyncEnable_1100 end====
"
);
done
();
});
...
...
account/appaccount/getallaccessibleaccounts/actsgetallaccessibleaccounts/entry/src/main/js/test/Getallaccessible.test.js
浏览文件 @
d20b345c
...
...
@@ -33,7 +33,7 @@ describe('ActsGetAllAccessibleAccounts', function () {
console
.
debug
(
"
====>getAllAccessibleAccounts 0100 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0100 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0100 data.length:
"
+
data
.
length
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsGetAllAccessibleAccounts_0100 end====
"
);
done
();
...
...
@@ -77,12 +77,12 @@ describe('ActsGetAllAccessibleAccounts', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
accessibleAccount_callback_single
"
,
(
err
)
=>
{
console
.
debug
(
"
====> add account ActsGetAllAccessibleAccounts_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccessibleAccounts
((
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccessibleAccounts 0300 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0300 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0300 data.length:
"
+
data
.
length
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
1
);
try
{
expect
(
data
[
0
].
name
).
assertEqual
(
"
accessibleAccount_callback_single
"
);
...
...
@@ -95,7 +95,7 @@ describe('ActsGetAllAccessibleAccounts', function () {
}
appAccountManager
.
deleteAccount
(
"
accessibleAccount_callback_single
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account ActsGetAllAccessibleAccounts_0300 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsGetAllAccessibleAccounts_0300 end====
"
);
done
();
})
...
...
@@ -166,18 +166,18 @@ describe('ActsGetAllAccessibleAccounts', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
accessibleAccount_callback_first
"
,
(
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>add account third time 0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccessibleAccounts
((
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccessibleAccounts 0500 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0500 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0500 data.length:
"
+
data
.
length
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
3
);
try
{
expect
(
data
[
0
].
name
).
assertEqual
(
"
accessibleAccount_callback_first
"
);
...
...
@@ -194,13 +194,13 @@ describe('ActsGetAllAccessibleAccounts', function () {
}
appAccountManager
.
deleteAccount
(
"
accessibleAccount_callback_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete Account second 0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
accessibleAccount_callback_third
"
,
(
err
)
=>
{
console
.
debug
(
"
====>delete Account third 0500 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsGetAllAccessibleAccounts_0500 end====
"
);
done
();
})
...
...
@@ -288,21 +288,21 @@ describe('ActsGetAllAccessibleAccounts', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
accessibleAccount_callback_delete_first
"
,
(
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
)
=>
{
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
)
=>
{
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
)
=>
{
console
.
debug
(
"
====>delete second account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccessibleAccounts
((
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccessibleAccounts 0700 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0700 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAllAccessibleAccounts 0700 data.length:
"
+
data
.
length
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
2
);
try
{
expect
(
data
[
0
].
name
).
assertEqual
(
"
accessibleAccount_callback_delete_first
"
);
...
...
@@ -317,10 +317,10 @@ describe('ActsGetAllAccessibleAccounts', function () {
}
appAccountManager
.
deleteAccount
(
"
accessibleAccount_callback_delete_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete third account 0700 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsGetAllAccessibleAccounts_0700 end====
"
);
done
();
})
...
...
@@ -407,15 +407,15 @@ describe('ActsGetAllAccessibleAccounts', function () {
console
.
debug
(
"
====>creat finish====
"
);
appAccountManager
.
addAccount
(
"
accessibleAccount_callback_multiple_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>add third account 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
getAllAccessibleAccounts
((
err
,
data
)
=>
{
console
.
debug
(
"
====>getAllAccessibleAccounts first 0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccessibleAccounts first 0900 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAllAccessibleAccounts first 0900 data.length:
"
+
data
.
length
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
2
);
try
{
expect
(
data
[
0
].
name
).
assertEqual
(
"
accessibleAccount_callback_multiple_first
"
);
...
...
@@ -432,7 +432,7 @@ describe('ActsGetAllAccessibleAccounts', function () {
console
.
debug
(
"
====>getAllAccessibleAccounts second 0900 err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getAllAccessibleAccounts second 0900 data:
"
+
JSON
.
stringify
(
data
));
console
.
debug
(
"
====>getAllAccessibleAccounts second 0900 data.length:
"
+
data
.
length
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
length
).
assertEqual
(
2
);
try
{
expect
(
data
[
0
].
name
).
assertEqual
(
"
accessibleAccount_callback_multiple_first
"
);
...
...
@@ -447,10 +447,10 @@ describe('ActsGetAllAccessibleAccounts', function () {
}
appAccountManager
.
deleteAccount
(
"
accessibleAccount_callback_multiple_first
"
,
(
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
)
=>
{
console
.
debug
(
"
====>delete second account 0900 err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsGetAllAccessibleAccounts_0900 end====
"
);
done
();
})
...
...
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountGet.test.js
100755 → 100644
浏览文件 @
d20b345c
...
...
@@ -27,6 +27,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it
(
'
ActsOsAccountGetIdFormUid_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>testLocalId:
"
+
testLocalId
)
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
...
...
@@ -35,8 +37,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
,
(
err
,
localId
)
=>
{
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
err
).
assertEqual
(
null
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0100 end====
"
);
done
();
});
...
...
@@ -50,6 +52,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it
(
'
ActsOsAccountGetIdFormUid_0200
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0200 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
...
...
@@ -57,7 +60,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
console
.
debug
(
"
====>obtained uid:
"
+
uid
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
);
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0200 end====
"
);
done
();
});
...
...
@@ -76,7 +79,6 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS_ACCOUNT_SERVICE_MANAGER_BAD_UID_ERR
);
expect
(
localId
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0300 end====
"
);
done
();
});
...
...
@@ -116,7 +118,6 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS_ACCOUNT_SERVICE_MANAGER_BAD_UID_ERR
);
expect
(
localId
).
assertEqual
(
undefined
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0500 end====
"
);
done
();
});
...
...
@@ -150,12 +151,16 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it
(
'
ActsOsAccountGetIdFormProcess_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
var
uid
=
bundleInfo
.
uid
;
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
)
console
.
debug
(
"
====>get AccountManager finish====
"
);
osAccountManager
.
getOsAccountLocalIdFromProcess
((
err
,
localId
)
=>
{
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
err
).
assertEqual
(
null
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0100 end====
"
);
done
();
});
...
...
@@ -169,10 +174,15 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it
(
'
ActsOsAccountGetIdFormProcess_0200
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0200 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
var
uid
=
bundleInfo
.
uid
;
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
)
console
.
debug
(
"
====>testLocalId obtained by process:
"
+
testLocalId
)
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0200 end====
"
);
done
();
});
...
...
@@ -189,7 +199,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager
.
getOsAccountTypeFromProcess
((
err
,
accountType
)
=>
{
console
.
debug
(
"
====>get type err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>type obtained by process:
"
+
JSON
.
stringify
(
accountType
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
accountType
.
ADMIN
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsOsAccountGetTypeFormProcess_0100 end====
"
);
done
();
...
...
@@ -220,11 +230,12 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it
(
'
ActsOsAccountLocalIdSerial_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
100
,
(
err
,
serialNumber
)
=>
{
console
.
debug
(
"
====>ger serialNumber err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get serialNumber:
"
+
serialNumber
+
"
by localId: 100
"
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
var
serialNumberStr
=
serialNumber
.
toString
();
var
serialIntercept
=
serialNumberStr
.
substring
(
8
);
console
.
debug
(
"
====>truncate the last eight characters:
"
+
serialIntercept
);
...
...
@@ -232,8 +243,8 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager
.
getOsAccountLocalIdBySerialNumber
(
serialNumber
,
(
err
,
localId
)
=>
{
console
.
debug
(
"
====>ger localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get localId:
"
+
localId
+
"
by serialNumber:
"
+
serialNumber
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
err
).
assertEqual
(
null
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0100 end====
"
);
done
();
})
...
...
@@ -248,8 +259,9 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
it
(
'
ActsOsAccountLocalIdSerial_0200
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0200 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
serialNumber
=
await
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
100
);
var
serialNumber
=
await
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
testLocalId
);
console
.
debug
(
"
====>get serialNumber:
"
+
serialNumber
+
"
by localId: 100
"
);
var
serialNumberStr
=
serialNumber
.
toString
();
var
serialIntercept
=
serialNumberStr
.
substring
(
8
);
...
...
@@ -257,7 +269,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
expect
(
serialIntercept
).
assertEqual
(
"
00000001
"
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdBySerialNumber
(
serialNumber
);
console
.
debug
(
"
====>get localId:
"
+
localId
+
"
by serialNumber:
"
+
serialNumber
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0200 end====
"
);
done
();
});
...
...
@@ -274,7 +286,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
0
,
(
err
,
serialNumber
)
=>
{
console
.
debug
(
"
====>ger serialNumber err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get serialNumber:
"
+
serialNumber
+
"
by localId: 0
"
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
var
serialNumberStr
=
serialNumber
.
toString
();
var
serialIntercept
=
serialNumberStr
.
substring
(
8
);
console
.
debug
(
"
====>truncate the last eight characters:
"
+
serialIntercept
);
...
...
@@ -282,7 +294,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager
.
getOsAccountLocalIdBySerialNumber
(
serialNumber
,
(
err
,
localId
)
=>
{
console
.
debug
(
"
====>ger localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get localId:
"
+
localId
+
"
by serialNumber:
"
+
serialNumber
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
localId
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0300 end====
"
);
done
();
...
...
@@ -326,7 +338,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
osAccountManager
.
createOsAccount
(
"
osAccountNameIdSerialA
"
,
osaccount
.
OsAccountType
.
NORMAL
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>create os account err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>create os account OsAccountInfo:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountNameIdSerialA
"
);
expect
(
data
.
domainInfo
.
accountName
==
""
).
assertEqual
(
true
)
expect
(
data
.
type
.
NORMAL
).
assertEqual
(
1
);
...
...
@@ -334,19 +346,25 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
expect
(
data
.
isVerified
).
assertEqual
(
false
);
expect
(
data
.
distributedInfo
.
name
!=
null
).
assertEqual
(
true
);
expect
(
data
.
domainInfo
.
domain
==
""
).
assertEqual
(
true
);
expect
(
data
.
photo
==
""
).
assertEqual
(
true
);
expect
(
data
.
createTime
!=
""
).
assertEqual
(
true
);
expect
(
data
.
lastLoginTime
>=
0
).
assertEqual
(
true
);
expect
(
JSON
.
stringify
(
data
.
serialNumber
).
length
==
16
).
assertEqual
(
true
);
expect
(
data
.
isActived
).
assertEqual
(
false
);
expect
(
data
.
isCreateCompleted
).
assertEqual
(
true
)
localId
=
data
.
localId
;
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
localId
,
(
err
,
serialNumber
)
=>
{
console
.
debug
(
"
====>queryOsAccountById err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get serialNumber:
"
+
serialNumber
+
"
by localId:
"
+
localId
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
osAccountManager
.
getOsAccountLocalIdBySerialNumber
(
serialNumber
,
(
err
,
getlocalId
)
=>
{
console
.
debug
(
"
====>ger localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get localId:
"
+
getlocalId
+
"
by serialNumber:
"
+
serialNumber
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
getlocalId
).
assertEqual
(
localId
);
osAccountManager
.
removeOsAccount
(
localId
,
(
err
)
=>
{
console
.
debug
(
"
====>remove localId:
"
+
localId
+
"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0500 end====
"
);
done
();
})
...
...
@@ -366,7 +384,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
var
osAccountManager
=
osaccount
.
getAccountManager
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
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
));
expect
(
OsAccountInfo
.
localName
).
assertEqual
(
"
accountIdSerialB
"
);
localId
=
OsAccountInfo
.
localId
;
...
...
@@ -395,38 +413,38 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
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 data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
obtainCount
=
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 OsAccountInfo:
"
+
JSON
.
stringify
(
data
));
localIdFir
=
data
.
localId
;
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountNameIdSerialE
"
);
osAccountManager
.
createOsAccount
(
"
osAccountIdSerialF
"
,
osaccount
.
OsAccountType
.
NORMAL
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>create second os account err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>create second os account OsAccountInfo:
"
+
JSON
.
stringify
(
data
));
localIdSec
=
data
.
localId
;
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
.
localName
).
assertEqual
(
"
osAccountIdSerialF
"
);
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 count:
"
+
count
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
count
=
count
-
2
;
expect
(
count
).
assertEqual
(
obtainCount
);
osAccountManager
.
removeOsAccount
(
localIdFir
,
(
err
)
=>
{
console
.
debug
(
"
====>remove localId:
"
+
localIdFir
+
"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
osAccountManager
.
getCreatedOsAccountsCount
((
err
,
data
)
=>
{
console
.
debug
(
"
====>obtains the number accounts created err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>obtains the number accounts created data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
data
=
data
-
1
;
expect
(
data
).
assertEqual
(
obtainCount
);
osAccountManager
.
removeOsAccount
(
localIdSec
,
(
err
)
=>
{
console
.
debug
(
"
====>remove localId:
"
+
localIdSec
+
"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
console
.
debug
(
"
====>ActsOsAccountGetCount_0100 end====
"
);
done
();
})
...
...
@@ -479,7 +497,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
var
osAccountManager
=
osaccount
.
getAccountManager
();
osAccountManager
.
queryActivatedOsAccountIds
((
err
,
dataArray
)
=>
{
console
.
info
(
"
====>ActsOsAccountGQueryActicedOsAccountIds_0100 err :
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
null
)
console
.
info
(
"
====>ActsOsAccountGQueryActicedOsAccountIds_0100 dataArray
"
+
dataArray
.
length
);
done
();
})
...
...
@@ -493,7 +511,7 @@ describe('ActsOsAccountThirdPartyTest_third1', function () {
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
"
====>ActsOsAccountQueryActivedOsAccountIds_0200 err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
)
expect
(
err
).
assertEqual
(
null
)
done
();
});
})
...
...
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountIs.test.js
浏览文件 @
d20b345c
...
...
@@ -42,7 +42,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager
.
getDistributedVirtualDeviceId
((
err
,
id
)
=>
{
console
.
debug
(
"
====>getDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getDistributedVirtualDeviceId deviceId:
"
+
id
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
id
).
assertEqual
(
deviceId
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
done
();
...
...
@@ -89,7 +89,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager
.
isOsAccountActived
(
0
,
(
err
,
isActived
)
=>
{
console
.
debug
(
"
====>isOsAccountActived err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>isOsAccountActived isActived:
"
+
isActived
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
isActived
).
assertEqual
(
true
);
console
.
debug
(
"
====>ActsOsAccountIsActived_0100 end
"
);
done
();
...
...
@@ -245,7 +245,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager
.
isMultiOsAccountEnable
((
err
,
data
)
=>
{
console
.
debug
(
"
====>isMultiOsAccountEnable err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>isMultiOsAccountEnable data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
true
);
console
.
debug
(
"
====>ActsOsAccountIsMulty_0100 end====
"
);
done
();
...
...
@@ -287,7 +287,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager
.
isOsAccountVerified
((
err
,
data
)
=>
{
console
.
debug
(
"
====>isOsAccountVerified err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>isOsAccountVerified data:
"
+
data
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
false
);
console
.
debug
(
"
====>ActsOsAccountVerified_0100 end====
"
);
done
();
...
...
@@ -321,7 +321,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
console
.
debug
(
"
====>get os AccountManager finish====
"
);
AccountManager
.
isOsAccountVerified
(
0
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>isOsAccountVerified err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertFalse
();
console
.
debug
(
"
====>ActsOsAccountIsVerified_0300 end====
"
);
done
();
...
...
@@ -356,7 +356,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager
.
isOsAccountVerified
(
localIdStr
,
(
err
,
data
)
=>
{
console
.
debug
(
"
====>error received callback====
"
);
console
.
debug
(
"
====>receive isOsAccountVerified err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
false
);
console
.
debug
(
"
====>receive isOsAccountVerified data:
"
+
JSON
.
stringify
(
data
));
done
();
...
...
@@ -396,7 +396,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
var
localIdUndefined
=
undefined
;
AccountManager
.
isOsAccountVerified
(
localIdUndefined
,
(
err
,
data
)
=>
{
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
))
expect
(
data
).
assertEqual
(
false
)
console
.
debug
(
"
====>ActsOsAccountIsVerified_0700 end====
"
);
...
...
@@ -477,7 +477,7 @@ describe('ActsOsAccountThirdPartyTest_third2', function () {
AccountManager
.
isTestOsAccount
((
err
,
data
)
=>
{
console
.
debug
(
"
====>isTestOsAccount err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>isTestOsAccount data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
null
);
expect
(
data
).
assertEqual
(
false
);
console
.
debug
(
"
====>ActsOsAccountIsTest_0100 end====
"
);
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录