Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b051a3ab
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看板
提交
b051a3ab
编写于
8月 24, 2022
作者:
C
chengxingzhen
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
XTS测试套优化用例并删除release接口相关用例
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
3340388b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
146 deletion
+4
-146
ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/src/main/js/test/DataAbilityHelperJsSt.test.js
...cessortest/src/main/js/test/DataAbilityHelperJsSt.test.js
+4
-146
未找到文件。
ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/src/main/js/test/DataAbilityHelperJsSt.test.js
浏览文件 @
b051a3ab
...
...
@@ -59,13 +59,13 @@ describe('ActsDataAbilityHelperTest', function () {
console
.
log
(
'
ACTS_AcquireDataAbilityHelper_0100====<begin
'
);
console
.
debug
(
"
=ACTS_AcquireDataAbilityHelper_0100 dataAbilityUri====>
"
+
dataAbilityUri
)
try
{
var
abilityHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
)
console
.
log
(
'
ACTS_AcquireDataAbilityHelper_0100 abilityHelper ====>:
'
+
abilityHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
abilityHelper
))
if
(
DAHelper
==
null
){
var
abilityHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
)
console
.
log
(
'
ACTS_AcquireDataAbilityHelper_0100 abilityHelper ====>:
'
+
abilityHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
abilityHelper
))
DAHelper
=
abilityHelper
;
}
expect
(
typeof
(
ability
Helper
)).
assertEqual
(
"
object
"
);
expect
(
typeof
(
DA
Helper
)).
assertEqual
(
"
object
"
);
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_GetDataAbilityHelper_0100 acquireDataAbilityHelper catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
...
...
@@ -8317,146 +8317,4 @@ describe('ActsDataAbilityHelperTest', function () {
done
();
}
})
/*
* @tc.number: ACTS_Release_0100
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by promise)
*/
it
(
'
ACTS_Release_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0100====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
().
then
((
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0100 then data====>
"
+
(
"
json data 【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,
"
+
data
);
expect
(
data
).
assertEqual
(
true
);
console
.
log
(
'
ACTS_Release_0100====<end
'
);
done
();
}).
catch
(
err
=>
{
console
.
debug
(
"
=ACTS_Release_0100 catch err ====>
"
+
(
"
json err 【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
));
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0100====<end .catch
'
);
done
();
});
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0100 release promise catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0100====<end catch(err)
'
);
done
();
}
})
/*
* @tc.number: ACTS_Release_0200
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_Release_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0200====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
((
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0200 err,data=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】;
"
));
console
.
log
(
'
featureAbility getDataAbilityHelper ACTS_Release_0200 data:
'
+
data
)
expect
(
data
).
assertEqual
(
true
);
console
.
log
(
'
ACTS_Release_0200====<end
'
);
done
();
},
);
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0200 release AsyncCallback catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0200====<end catch
'
);
done
();
}
})
/*
* @tc.number: ACTS_Release_0300
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by promise)
*/
it
(
'
ACTS_Release_0300
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0300====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
().
then
((
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0300 then data====>
"
+
(
"
json data 【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,
"
+
data
);
expect
(
data
).
assertEqual
(
true
);
rDAHelper
.
release
().
then
((
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0300 then data====>
"
+
(
"
json data 【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,
"
+
data
);
expect
(
data
).
assertEqual
(
false
);
console
.
log
(
'
ACTS_Release_0300====<end
'
);
done
();
}).
catch
(
err
=>
{
console
.
debug
(
"
=ACTS_Release_0300 catch err ====>
"
+
(
"
json err 【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
));
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0300====<end .catch
'
);
done
();
});
}).
catch
(
err
=>
{
console
.
debug
(
"
=ACTS_Release_0300 catch err ====>
"
+
(
"
json err 【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
));
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0300====<end .catch
'
);
done
();
});
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0300 release promise catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0300====<end catch(err)
'
);
done
();
}
})
/*
* @tc.number: ACTS_Release_0400
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_Release_0400
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0400====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
((
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0400 err,data=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】;
"
));
console
.
log
(
'
featureAbility getDataAbilityHelper ACTS_Release_0400 data:
'
+
data
)
expect
(
data
).
assertEqual
(
true
);
rDAHelper
.
release
((
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0400 err,data=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
,
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】;
"
));
console
.
log
(
'
featureAbility getDataAbilityHelper ACTS_Release_0400 data:
'
+
data
)
expect
(
data
).
assertEqual
(
false
);
console
.
log
(
'
ACTS_Release_0400====<end
'
);
done
();
},
);
},
);
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0400 release AsyncCallback catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0400====<end catch
'
);
done
();
}
})
})}
鸿蒙社区
@harmonycommunity
mentioned in commit
272552f0
·
9月 07, 2022
mentioned in commit
272552f0
mentioned in commit 272552f043869cd8c41f482b855dac344a6cacec
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录