Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
45c3d17d
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
接近 2 年 前同步成功
通知
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看板
提交
45c3d17d
编写于
5月 25, 2022
作者:
I
inter515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增getApplicationInfo和getAllApplicationInfo接口用例
Signed-off-by:
N
inter515
<
ry.renyi@huawei.com
>
上级
9e139fd8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
264 addition
and
102 deletion
+264
-102
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets
...ry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets
+105
-22
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets
...entry/src/main/ets/test/getApplicationInfoJsunit.test.ets
+159
-80
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets
浏览文件 @
45c3d17d
...
...
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, it, expect } from '
hypium/index
';
import { describe, it, expect } from '
deccjsunit/index.ets
';
import Utils from './Utils';
import Bundle from '@ohos.bundle';
...
...
@@ -26,9 +26,12 @@ const TAG_TEST_0300_001 = ' bundle_getAllApplicationInfo_test_0300_007 ';
const TAG_TEST_0400_001 = ' bundle_getAllApplicationInfo_test_0400_008 ';
const TAG_TEST_0500_001 = ' bundle_getAllApplicationInfo_test_0500_009 ';
const TAG_TEST_0500_002 = ' bundle_getAllApplicationInfo_test_0500_0010 ';
const DEFAULT_FLAG = Bundle.BundleFlag.GET_BUNDLE_DEFAULT;
const BUNDLE_OTHER = 'com.example.third1';
const PATH = "/data/app/el1/bundle/public";
const USER_ID_100 = 100;
export default function
applicationBundleJsuni
t() {
export default function
getAllApplicationBundleTes
t() {
describe('appInfoTest', function () {
...
...
@@ -215,47 +218,95 @@ export default function applicationBundleJsunit() {
});
/**
* @tc.number: bundle_getApplicationInfo_test_0500_00
9
* @tc.number: bundle_getApplicationInfo_test_0500_00
10
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface (by promise)
* @tc.level 0
*/
it(TAG_TEST_0500_00
1
, 0, async function (done) {
it(TAG_TEST_0500_00
2
, 0, async function (done) {
let errors;
let startTime = await Utils.getNowTime();
await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT').then((data) => {
console.info(TAG_TEST_0500_00
1
+ 'noUserId promise data is: ' + data);
await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT'
, USER_ID_100
).then((data) => {
console.info(TAG_TEST_0500_00
2
+ 'noUserId promise data is: ' + data);
expect(data).assertFail();
}).catch((error) => {
console.info(TAG_TEST_0500_00
1 + 'no
UserId promise error is: ' + error);
console.info(TAG_TEST_0500_00
2 + '
UserId promise error is: ' + error);
errors = error;
expect(errors).assertEqual(1);
});
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0500_00
1
, startTime, endTime);
Utils.getDurationTime(TAG_TEST_0500_00
2
, startTime, endTime);
done();
});
/**
* @tc.number:
bundle_getApplicationInfo_test_0500_001
0
* @tc.number:
getApplicationInfos_100
0
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface (by promise)
* @tc.level 0
* @tc.desc: Check the return value of the interface
*/
it(TAG_TEST_0500_002, 0, async function (done) {
let errors;
let startTime = await Utils.getNowTime();
await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT', USER_ID_100).then((data) => {
console.info(TAG_TEST_0500_002 + 'noUserId promise data is: ' + data);
it('getApplicationInfos_1000', 0, async function (done) {
await Bundle.getAllApplicationInfo(DEFAULT_FLAG).then((data) => {
expect(data.length).assertLarger(10);
let flag = 0;
for(let i in data){
if (data[i].name == BUNDLE_OTHER){
flag = 1;
getApplicationInfoSuccessOther(data[i]);
}
}
expect(flag).assertEqual(1);
}).catch((error) => {
expect(error).assertFail();
});
Bundle.getAllApplicationInfo(DEFAULT_FLAG, (err, data) => {
expect(err).assertEqual(0);
expect(data.length).assertLarger(10);
let flag = 0;
for(let i in data){
if (data[i].name == BUNDLE_OTHER){
flag = 1;
getApplicationInfoSuccessOther(data[i]);
}
}
expect(flag).assertEqual(1);
done();
});
});
/**
* @tc.number: getApplicationInfos_1200
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface
*/
it('getApplicationInfos_1200', 0, async function (done) {
await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT').then((data) => {
expect(data).assertFail();
}).catch((error) => {
console.info(TAG_TEST_0500_002 + 'UserId promise error is: ' + error);
errors = error;
expect(errors).assertEqual(1);
expect(error).assertEqual(1);
});
await Bundle.getAllApplicationInfo(null).then((data) => {
expect(data).assertFail();
}).catch((error) => {
expect(error).assertEqual(1);
});
await Bundle.getAllApplicationInfo(undefined).then((data) => {
expect(data).assertFail();
}).catch((error) => {
expect(error).assertEqual(1);
});
Bundle.getAllApplicationInfo(undefined, (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT', (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
Bundle.getAllApplicationInfo(null, (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
done();
});
});
});
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0500_002, startTime, endTime);
done();
});
function expectData(msg, data) {
...
...
@@ -326,6 +377,38 @@ export default function applicationBundleJsunit() {
}
}
function getApplicationInfoSuccessOther(data) {
expect(data.name).assertEqual(BUNDLE_OTHER);
expect(data.codePath).assertEqual(PATH + '/' + BUNDLE_OTHER);
expect(data.accessTokenId).assertLarger(0);
expect(data.description).assertEqual('$string:mainability_description');
expect(data.descriptionId).assertLarger(0);
expect(data.icon).assertEqual('$media:icon');
expect(data.iconId).assertLarger(0);
expect(data.label).assertEqual('$string:app_name');
expect(data.labelId).assertLarger(0);
expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual("");
expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.permissions.length).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(JSON.stringify(data.metaData)).assertEqual("{}");
expect(JSON.stringify(data.metadata)).assertEqual("{}");
expect(data.enabled).assertTrue();
expect(data.flags).assertEqual(0);
expect(data.uid).assertLarger(0);
expect(data.entityType).assertEqual('unspecified');
expect(data.removable).assertTrue();
expect(data.fingerprint).assertEqual("");
console.info('check end');
}
});
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets
浏览文件 @
45c3d17d
...
...
@@ -30,10 +30,13 @@ const TAG_TEST_0600_001 = ' bundle_getApplicationInfo_test_0600_0011 ';
const TAG_TEST_0600_002 = ' bundle_getApplicationInfo_test_0600_0012 ';
const TAG_TEST_0600_003 = ' bundle_getApplicationInfo_test_0600_0013 ';
const BUNDLE_NAME = 'com.open.harmony.packagemag';
const BUNDLE_NAME_OTHER = 'com.ohos.acepackage';
const BUNDLE_OTHER = 'com.example.third1';
const BUNDLE_NOTEXIST = 'com.ohos.package';
const FLAG_DEFAULT = Bundle.BundleFlag.GET_BUNDLE_DEFAULT;
const PATH = "/data/app/el1/bundle/public";
const USER_ID_100 = 100;
export default function
getApplicationInfo
Jsunit() {
export default function
applicationBundle
Jsunit() {
describe('appInfoTest', function () {
...
...
@@ -222,26 +225,6 @@ export default function getApplicationInfoJsunit() {
done();
});
/**
* @tc.number: bundle_getApplicationInfo_test_0500_001
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface (by promise)
* @tc.level 0
*/
it(TAG_TEST_0500_001, 0, async function (done) {
let startTime = await Utils.getNowTime();
await Bundle.getApplicationInfo('', Bundle.BundleFlag.GET_BUNDLE_DEFAULT).then((data) => {
console.info(TAG_TEST_0500_001 + 'noUserId promise data is: ' + data);
expect(data).assertFail();
}).catch((error) => {
console.info(TAG_TEST_0500_001 + 'noUserId promise error is: ' + error);
expect(error).assertEqual(1);
});
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0500_001, startTime, endTime);
done();
});
/**
* @tc.number: bundle_getApplicationInfo_test_0500_002
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
...
...
@@ -262,29 +245,6 @@ export default function getApplicationInfoJsunit() {
done();
});
/**
* @tc.number: bundle_getApplicationInfo_test_0600_001
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface (by promise)
* @tc.level 0
*/
it(TAG_TEST_0600_001, 0, async function (done) {
let errors
let startTime = await Utils.getNowTime();
await Bundle.getApplicationInfo(BUNDLE_NAME_OTHER,
Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION).then((data) => {
console.info(TAG_TEST_0600_001 + 'other bundleName noUserId promise data is: ' + data);
expect(data).assertFail();
}).catch((error) => {
console.info(TAG_TEST_0600_001 + 'other bundleName noUserId promise error is: ' + error);
errors = error
expect(errors).assertEqual(1);
});
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0600_001, startTime, endTime);
done();
});
/**
* @tc.number: bundle_getApplicationInfo_test_0600_002
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
...
...
@@ -294,7 +254,7 @@ export default function getApplicationInfoJsunit() {
it(TAG_TEST_0600_002, 0, async function (done) {
let startTime = await Utils.getNowTime();
let errors
await Bundle.getApplicationInfo(BUNDLE_N
AME_OTHER
,
await Bundle.getApplicationInfo(BUNDLE_N
OTEXIST
,
Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100).then((data) => {
console.info(TAG_TEST_0600_002 + 'other bundleName UserId promise data is: ' + data);
expect(data).assertFail();
...
...
@@ -309,25 +269,111 @@ export default function getApplicationInfoJsunit() {
});
/**
* @tc.number:
bundle_getApplicationInfo_test_0600_003
* @tc.number:
getApplicationInfo_1300
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface (by promise)
* @tc.level 0
* @tc.desc: Check the return value of the interface
*/
it(
TAG_TEST_0600_003
, 0, async function (done) {
it(
'getApplicationInfo_1300'
, 0, async function (done) {
let startTime = await Utils.getNowTime();
await Bundle.getApplicationInfo(BUNDLE_NAME,
Bundle.BundleFlag.GET_BUNDLE
_DEFAULT).then((data) => {
await Bundle.getApplicationInfo(BUNDLE_NAME,
FLAG
_DEFAULT).then((data) => {
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0600_003, startTime, endTime);
console.info(TAG_TEST_0600_003 + 'noUserId promise data is: ' + data);
expect(typeof (data)).assertEqual("object");
expectData(TAG_TEST_0600_003, data);
getApplicationInfoSuccess_plus(TAG_TEST_0600_003, data);
}).catch((error) => {
console.info(TAG_TEST_0600_003 + 'noUserId promise error is: ' + error);
expect(error).assertFail();
});
startTime = await Utils.getNowTime();
Bundle.getApplicationInfo(BUNDLE_NAME, FLAG_DEFAULT, (err, data) => {
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0600_003, startTime, endTime);
console.info(TAG_TEST_0600_003 + 'noUserId promise data is: ' + data);
expectData(TAG_TEST_0600_003, data);
getApplicationInfoSuccess_plus(TAG_TEST_0600_003, data);
expect(err).assertEqual(0);
done();
});
});
/**
* @tc.number: getApplicationInfo_1400
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface
*/
it('getApplicationInfo_1400', 0, async function (done) {
await Bundle.getApplicationInfo(BUNDLE_OTHER, FLAG_DEFAULT).then((data) => {
console.info('noUserId promise data is: ' + data);
getApplicationInfoSuccessOther(data);
}).catch((error) => {
expect(error).assertFail();
});
Bundle.getApplicationInfo(BUNDLE_OTHER, FLAG_DEFAULT, (err, data) => {
console.info('noUserId promise data is: ' + data);
expect(err).assertEqual(0);
getApplicationInfoSuccessOther(data);
done();
});
});
/**
* @tc.number: getApplicationInfo_1500
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface
*/
it('getApplicationInfo_1500', 0, async function (done) {
let startTime = await Utils.getNowTime();
await Bundle.getApplicationInfo(BUNDLE_NOTEXIST, FLAG_DEFAULT).then((data) => {
expect(data).assertFail();
}).catch((error) => {
expect(error).assertEqual(1);
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0600_001, startTime, endTime);
});
startTime = await Utils.getNowTime();
await Bundle.getApplicationInfo(BUNDLE_NOTEXIST, FLAG_DEFAULT, (err, data) => {
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0600_001, startTime, endTime);
expect(err).assertEqual(1);
expect(JSON.stringify(data)).assertEqual(undefined);
done();
});
});
/**
* @tc.number: getApplicationInfo_1700
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface
*/
it('getApplicationInfo_1700', 0, async function (done) {
await Bundle.getApplicationInfo('', FLAG_DEFAULT).then((data) => {
expect(data).assertFail();
}).catch((error) => {
expect(error).assertEqual(1);
});
await Bundle.getApplicationInfo(null, FLAG_DEFAULT).then((data) => {
expect(data).assertFail();
}).catch((error) => {
expect(error).assertEqual(1);
});
await Bundle.getApplicationInfo(BUNDLE_NAME, null).then((data) => {
expect(data).assertFail();
}).catch((error) => {
expect(error).assertEqual(1);
});
Bundle.getApplicationInfo('', FLAG_DEFAULT, (err, data) => {
expect(err).assertEqual(1);
expect(JSON.stringify(data)).assertEqual(undefined);
Bundle.getApplicationInfo(null, FLAG_DEFAULT, (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
Bundle.getApplicationInfo(BUNDLE_NAME, null, (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
done();
});
});
});
});
function expectData(msg, data) {
...
...
@@ -358,8 +404,8 @@ export default function getApplicationInfoJsunit() {
}
function getApplicationInfoSuccess(msg, data) {
expect(data.name).assertEqual(
'com.open.harmony.packagemag'
);
expect(data.codePath).assertEqual(
'/data/app/el1/bundle/public/com.open.harmony.packagemag'
);
expect(data.name).assertEqual(
BUNDLE_NAME
);
expect(data.codePath).assertEqual(
PATH + '/' + BUNDLE_NAME
);
expect(data.accessTokenId > 0).assertEqual(true);
expect(data.description).assertEqual('$string:mainability_description');
expect(data.descriptionId > 0).assertEqual(true);
...
...
@@ -372,16 +418,13 @@ export default function getApplicationInfoJsunit() {
expect(data.supportedModes).assertEqual(0);
expect(data.flags).assertEqual(0);
expect(data.process).assertEqual("");
expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' +
'/com.open.harmony.packagemag');
expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.enabled).assertEqual(true);
expect(data.entityType).assertEqual('unspecified');
expect(data.removable).assertEqual(true);
expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' +
'com.open.harmony.packagemag/com.open.harmony.packagemag');
expect(data.moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' +
'com.open.harmony.packagemag/com.open.harmony.packagemag');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.permissions[0]).assertEqual("ohos.permission.CHANGE_ABILITY_ENABLED_STATE");
expect(data.permissions[1]).assertEqual("ohos.permission.GET_BUNDLE_INFO");
expect(data.permissions[2]).assertEqual("ohos.permission.GET_BUNDLE_INFO_PRIVILEGED");
...
...
@@ -389,31 +432,67 @@ export default function getApplicationInfoJsunit() {
}
function getApplicationInfoSuccess_plus(msg, data) {
expect(data.name).assertEqual(
'com.open.harmony.packagemag'
);
expect(data.codePath).assertEqual(
'/data/app/el1/bundle/public/com.open.harmony.packagemag'
);
expect(data.accessTokenId
> 0).assertEqual(true
);
expect(data.name).assertEqual(
BUNDLE_NAME
);
expect(data.codePath).assertEqual(
PATH + '/' + BUNDLE_NAME
);
expect(data.accessTokenId
).assertLarger(0
);
expect(data.description).assertEqual('$string:mainability_description');
expect(data.descriptionId
> 0).assertEqual(true
);
expect(data.descriptionId
).assertLarger(0
);
expect(data.icon).assertEqual('$media:icon');
expect(data.iconId > 0).assertEqual(true);
expect(data.uid > 0).assertEqual(true);
expect(data.iconId).assertLarger(0);
expect(data.label).assertEqual('$string:entry_MainAbility');
expect(data.labelId
> 0).assertEqual(true
);
expect(data.systemApp).assert
Equal(true
);
expect(data.labelId
).assertLarger(0
);
expect(data.systemApp).assert
True(
);
expect(data.supportedModes).assertEqual(0);
expect(data.flags).assertEqual(0);
expect(data.process).assertEqual("");
expect(data.entryDir).assertEqual(
'/data/app/el1/bundle/public/com.open.harmony.packagemag' +
'/com.open.harmony.packagemag'
);
expect(data.
enabled).assertEqual(true
);
expect(data.
entityType).assertEqual('unspecified'
);
expect(data.
removable).assertEqual(true
);
expect(data.entryDir).assertEqual(
PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.permissions.length).assertEqual(0
);
expect(data.
moduleSourceDirs.length).assertEqual(1
);
expect(data.
moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME
);
expect(data.
moduleInfos.length).assertEqual(1
);
expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' +
'com.open.harmony.packagemag/com.open.harmony.packagemag');
expect(data.moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' +
'com.open.harmony.packagemag/com.open.harmony.packagemag');
console.log(msg + ' end ' + JSON.stringify(data));
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(JSON.stringify(data.metaData)).assertEqual("{}");
expect(JSON.stringify(data.metadata)).assertEqual("{}");
expect(data.enabled).assertTrue();
expect(data.flags).assertEqual(0);
expect(data.uid).assertLarger(0);
expect(data.entityType).assertEqual('unspecified');
expect(data.removable).assertTrue();
expect(data.fingerprint).assertEqual("");
console.info(msg + ' end ');
}
function getApplicationInfoSuccessOther(data) {
expect(data.name).assertEqual(BUNDLE_OTHER);
expect(data.codePath).assertEqual(PATH + '/' + BUNDLE_OTHER);
expect(data.accessTokenId).assertLarger(0);
expect(data.description).assertEqual('$string:mainability_description');
expect(data.descriptionId).assertLarger(0);
expect(data.icon).assertEqual('$media:icon');
expect(data.iconId).assertLarger(0);
expect(data.label).assertEqual('$string:app_name');
expect(data.labelId).assertLarger(0);
expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual("");
expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.permissions.length).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(JSON.stringify(data.metaData)).assertEqual("{}");
expect(JSON.stringify(data.metadata)).assertEqual("{}");
expect(data.enabled).assertTrue();
expect(data.flags).assertEqual(0);
expect(data.uid).assertLarger(0);
expect(data.entityType).assertEqual('unspecified');
expect(data.removable).assertTrue();
expect(data.fingerprint).assertEqual("");
console.info('check end');
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录