提交 03a84e98 编写于 作者: 张悦诶

IssueNo:#I5CGCB:add getApplicationInfo xts

Description:add getApplicationInfo xts
Sig:SIG_ApplicaitonFramework
Feature or Bugfix:Feature
Binary Source:No
Signed-off-by: N张悦诶 <zhangyue230@h-partners.com>
上级 cee215e3
......@@ -388,6 +388,31 @@ export default function applicationBundleJsunit() {
});
});
/**
* @tc.number: getApplicationInfo_1800
* @tc.name: Test getApplicationInfo
* @tc.desc: Test whether the iconResource, labelResource and descriptionResource
* in the getApplicationInfo of the case meet the expectations
*/
it('testGetApplicationInfo', 0, async function (done) {
await Bundle.getApplicationInfo(BUNDLE_NAME, 0)
.then((applicationInfo) => {
expect(applicationInfo.iconResource.bundleName).assertEqual('com.open.harmony.packagemag')
expect(applicationInfo.iconResource.moduleName).assertEqual('entry')
expect(applicationInfo.iconResource.id).assertEqual(16777218)
expect(applicationInfo.labelResource.bundleName).assertEqual('com.open.harmony.packagemag')
expect(applicationInfo.labelResource.moduleName).assertEqual('entry')
expect(applicationInfo.labelResource.id).assertEqual(16777216)
expect(applicationInfo.descriptionResource.bundleName).assertEqual('com.open.harmony.packagemag')
expect(applicationInfo.descriptionResource.moduleName).assertEqual('entry')
expect(applicationInfo.descriptionResource.id).assertEqual(16777217)
done();
}).catch((err) => {
expect(err).assertFail();
done();
});
})
function expectData(msg, data) {
expect(typeof (data)).assertEqual('object');
expect(typeof (data.name)).assertEqual('string');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册