提交 dc3e9ccb 编写于 作者: L lichenchen

账号getAllAccount接口改动xts用例配合修改

Signed-off-by: Nlichenchen <lichenchen15@huawei.com>
上级 5eb35d13
......@@ -148,7 +148,11 @@ export default function ActsAccountErrPermission() {
expect(err).assertEqual(null);
appAccountManager.getAllAccounts((err, data)=>{
console.debug("====>getAllAccounts 0500 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_PERMISSION_DENIED);
console.debug("====>getAllAccounts 0500 data:" + JSON.stringify(data));
expect(err).assertEqual(null);
expect(data.length).assertEqual(1);
expect(data[0].name).assertEqual("accessibleAccount_callback_nopermission");
expect(data[0].owner).assertEqual("com.example.actsaccountoperatetest");
appAccountManager.removeAccount("accessibleAccount_callback_nopermission", (err)=>{
console.debug("====>delete Account ActsAccountErrPermission_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
......@@ -181,6 +185,11 @@ export default function ActsAccountErrPermission() {
console.debug("====>ActsAccountErrPermission_0600 end====");
done();
}
expect(data.length).assertEqual(1);
expect(data[0].name).assertEqual("accessibleAccount_promise_nopermission");
expect(data[0].owner).assertEqual("com.example.actsaccountoperatetest");
console.debug("====>getAllAccounts 0600 err:" + JSON.stringify(data));
done();
});
/*
......
......@@ -171,8 +171,9 @@ export default function GetAccountsByOwner() {
console.debug("====>creat finish====");
var emptyBundle = "";
appAccountManager.getAccountsByOwner(emptyBundle, (err, data)=>{
console.debug("====>getAccountsByOwner 0500 data:" + JSON.stringify(data));
console.debug("====>getAccountsByOwner 0500 err:" + JSON.stringify(err));
expect(err.code == 12300002).assertEqual(true);
expect(err).assertEqual(null);
console.debug("====>GetAccountsByOwner_0500 end====");
done();
})
......@@ -190,10 +191,11 @@ export default function GetAccountsByOwner() {
var emptyBundle = "";
try{
var data = await appAccountManager.getAccountsByOwner(emptyBundle);
}
catch(err){
console.debug("====>getAccountsByOwner 0600 data:" + JSON.stringify(data));
done();
} catch(err) {
console.debug("====>getAccountsByOwner 0600 err:" + JSON.stringify(err));
expect(err.code == 12300002).assertEqual(true);
expect(err).assertEqual(null);
console.debug("====>GetAccountsByOwner_0600 end====");
done();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册