提交 8b012c29 编写于 作者: C cclicn

【应用账号】xts用例整改,取消账号名空格字符限制

Signed-off-by: Ncclicn <lichenchen22@huawei.com>
上级 6feebf67
......@@ -339,13 +339,18 @@ export default function ActsAccountCreateAccount() {
console.debug("====>ActsAccountCreateAccount_1500 start====");
var appAccountManager = account.createAppAccountManager();
var specialStr = " ";
try{
try {
appAccountManager.createAccount(specialStr, createAccountOptions, (err)=>{
expect(err.code == 12300002).assertEqual(true);
console.error("====>createAccount ActsAccountCreateAccount_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
console.debug("====>ActsAccountCreateAccount_1500 end====");
appAccountManager.removeAccount(" ", (err)=>{
console.error("====>removeAccount ActsAccountCreateAccount_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
done();
});
}catch(err){
});
} catch (err) {
expect().assertFail();
done();
}
......@@ -360,14 +365,13 @@ export default function ActsAccountCreateAccount() {
console.debug("====>ActsAccountCreateAccount_1600 start====");
var appAccountManager = account.createAppAccountManager();
var specialStr = " ";
try{
try {
await appAccountManager.createAccount(specialStr, createAccountOptions);
expect().assertFail();
await appAccountManager.removeAccount(specialStr);
done();
}
catch(err){
console.debug("====>add Account ActsAccountCreateAccount_1600 err:" + JSON.stringify(err));
expect(err.code == 12300002).assertEqual(true);
} catch (err) {
console.debug("====>createAccount ActsAccountCreateAccount_1600 err:" + JSON.stringify(err));
expect().assertFail();
console.debug("====>ActsAccountCreateAccount_1600 end====");
done();
}
......
......@@ -1087,22 +1087,25 @@ export default function ActsAccountCustomData() {
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.createAccount(" ", (err)=>{
console.debug("====>add account ActsAccountCustomData_2900 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>createAccount ActsAccountCustomData_2900 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
appAccountManager.setCustomData(" ", "key29", "value29", (err)=>{
console.debug("====>setCustomData ActsAccountCustomData_2900 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
expect(err).assertEqual(null);
appAccountManager.getCustomData(" ", "key29", (err, data)=>{
console.debug("====>getCustomData 2900 err:" + JSON.stringify(err));
console.debug("====>getCustomData 2900 data:" + JSON.stringify(data));
expect(err.code != 0).assertEqual(true);
expect(data).assertEqual(null);
console.debug("====>ActsAccountCustomData_2900 end====");
expect(err).assertEqual(null);
expect(data).assertEqual("value29");
appAccountManager.removeAccount(" ", (err)=>{
console.error("====>removeAccount ActsAccountCustomData_2900 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
done();
});
});
});
});
});
/*
* @tc.number : ActsAccountCustomData_3000
......@@ -1113,28 +1116,18 @@ export default function ActsAccountCustomData() {
console.debug("====>ActsAccountCustomData_3000 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
try{
try {
await appAccountManager.createAccount(" ");
}
catch(err){
console.debug("====>add account ActsAccountCustomData_3000 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
try{
await appAccountManager.setCustomData(" ", "key30", "value30");
}
catch(err){
console.error("====>setCustomData ActsAccountCustomData_3000 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
try{
await appAccountManager.getCustomData(" ", "key30");
}
catch(err){
console.error("====>getCustomData ActsAccountCustomData_3000 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountCustomData_3000 end====");
var data = await appAccountManager.getCustomData(" ", "key30");
console.error("====>getCustomData ActsAccountCustomData_3000 data:" + JSON.stringify(data));
expect(data).assertEqual("value30");
await appAccountManager.removeAccount(" ");
done();
} catch (err) {
console.error("====>ActsAccountCustomData_3000 fail err:" + JSON.stringify(err));
expect().assertFail();
done();
}
}
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册