提交 6c600391 编写于 作者: X xionglei6

xts:add test example

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 5ff80818
...@@ -321,114 +321,4 @@ describe('SystemParameterTest', function () { ...@@ -321,114 +321,4 @@ describe('SystemParameterTest', function () {
}, '1000'); }, '1000');
console.info('system_parameter_test_0810 end'); console.info('system_parameter_test_0810 end');
}) })
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0811
* @tc.name testWatcher01
* @tc.desc Watch the value of the attribute with the specified key.
*/
it('system_parameter_test_0811', 0, function () {
console.info('system_parameter_test_0811 start');
var ret = true;
try {
let watcher = systemparameter.getWatcher("test.watcher_param.205");
console.info('system_parameter_test_0811 watcher' + watcher);
if (watcher === undefined) {
ret = false;
}
} catch (e) {
ret = false;
console.info("input error: " + e);
}
expect(ret).assertTrue();
console.info('system_parameter_test_0811 end');
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0812
* @tc.name testWatcher02
* @tc.desc Watch the value of the attribute with the specified key.
*/
it('system_parameter_test_0812', 0, function () {
console.info('system_parameter_test_0812 start');
var ret = true;
try {
let watcher = systemparameter.getWatcher("test.watch_param.205", -1);
console.info('system_parameter_test_0812 watcher' + watcher);
if (watcher === undefined) {
ret = false;
}
} catch (e) {
ret = false;
console.info("input error: " + e);
}
expect(ret).assertTrue();
console.info('system_parameter_test_0812 end');
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0813
* @tc.name testWatcher03
* @tc.desc Watch the value of the attribute with the specified key.
*/
it('system_parameter_test_0813', 0, function () {
console.info('system_parameter_test_0813 start');
var ret = false;
try {
ret = true;
let watcher = systemparameter.getWatcher("");
if (watcher === undefined) {
ret = false;
}
} catch (e) {
ret = true;
console.info("input error: " + e);
}
expect(ret).assertTrue();
console.info('system_parameter_test_0813 end');
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0814
* @tc.name testWatcher04
* @tc.desc Watch the value of the attribute with the specified key.
*/
it('system_parameter_test_0814', 0, function () {
console.info('system_parameter_test_0814 start');
var ret = false;
try {
ret = true;
let watcher = systemparameter.getWatcher("test.watcher.304^^^^");
if (watcher === undefined) {
ret = false;
}
} catch (e) {
ret = true;
console.info("input error: " + e);
}
expect(ret).assertTrue();
console.info('system_parameter_test_0814 end');
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0815
* @tc.name testWatcher05
* @tc.desc Watch the value of the attribute with the specified key.
*/
it('system_parameter_test_0815', 0, function () {
console.info('system_parameter_test_0815 start');
var ret = true;
try {
let watcher = systemparameter.getWatcher("test.watcher.304");
console.info('system_parameter_test_0815 start watcher ' + watcher);
if (watcher === undefined) {
ret = false;
}
} catch (e) {
ret = false;
console.info("input error: " + e);
}
expect(ret).assertTrue();
console.info('system_parameter_test_0815 end');
})
}) })
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册