Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8e98184a
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看板
未验证
提交
8e98184a
编写于
3月 07, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 07, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7844 【xts_acts】【MSDP】【master】修改主干xts用例适配新算法
Merge pull request !7844 from 刘皓男/master
上级
f04b2af6
0bcdbd2a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
270 addition
and
519 deletion
+270
-519
msdp/device_status/src/main/js/test/device_status_unittest.test.js
...ce_status/src/main/js/test/device_status_unittest.test.js
+270
-519
未找到文件。
msdp/device_status/src/main/js/test/device_status_unittest.test.js
浏览文件 @
8e98184a
...
...
@@ -18,563 +18,314 @@ import { describe, it, expect } from '@ohos/hypium'
const
MSEC_1000
=
1000
;
export
default
function
DeviceStatusUnitTest
()
{
describe
(
'
DeviceStatusUnitTest
'
,
function
()
{
console
.
log
(
"
*************DeviceStatus API Test Begin*************
"
);
/**
* @tc.number DeviceStatus_001
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_001
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_001 start
"
);
try
{
stationary
.
on
(
"
still
"
,
ActivityEvent
.
ENTER_EXIT
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
describe
(
'
DeviceStatusUnitTest
'
,
function
()
{
console
.
log
(
"
*************DeviceStatus API Test Begin*************
"
);
var
p_done
=
undefined
;
const
pub_callback
=
(
data
)
=>
{
console
.
log
(
'
callback data:
'
+
JSON
.
stringify
(
data
)
+
'
, data.value:
'
+
data
.
value
);
expect
(
data
.
value
>=
-
1
).
assertTrue
();
console
.
log
(
'
done
'
);
if
(
p_done
!=
undefined
)
{
p_done
();
}
else
{
console
.
log
(
'
p_done is undefined
'
);
}
}
})
/**
* @tc.number DeviceStatus_002
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_002
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_002 start
"
);
try
{
stationary
.
off
(
"
still
"
,
ActivityEvent
.
ENTER_EXIT
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_001
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_001
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_001 start
"
);
console
.
log
(
JSON
.
stringify
(
stationary
));
try
{
p_done
=
done
;
stationary
.
on
(
"
still
"
,
3
,
1
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error Log
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_003
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_003
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_003 start
"
);
try
{
stationary
.
once
(
"
still
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_004
* @tc.name
* @tc.callback:AsyncCallback<FineStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_004
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_004 start
"
);
try
{
stationary
.
on
(
"
fineStill
"
,
ActivityEvent
.
ENTER_EXIT
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_002
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_002
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_002 start
"
);
try
{
p_done
=
done
;
stationary
.
once
(
"
still
"
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_005
* @tc.name
* @tc.callback:AsyncCallback<FineStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_005
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_005 start
"
);
try
{
stationary
.
off
(
"
fineStill
"
,
ActivityEvent
.
ENTER_EXIT
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_006
* @tc.name
* @tc.callback:AsyncCallback<FineStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_006
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_006 start
"
);
try
{
stationary
.
once
(
"
fineStill
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_003
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_003
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_003 start
"
);
setTimeout
(
function
()
{
try
{
p_done
=
done
;
stationary
.
off
(
"
still
"
,
3
,
pub_callback
);
expect
(
true
).
assertTrue
();
p_done
();
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
},
200
);
})
/**
* @tc.number DeviceStatus_007
* @tc.name
* @tc.callback:AsyncCallback<CarBluetoothResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_007
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_007 start
"
);
try
{
stationary
.
on
(
"
carBluetooth
"
,
ActivityEvent
.
ENTER_EXIT
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_008
* @tc.name
* @tc.callback:AsyncCallback<CarBluetoothResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_008
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_008 start
"
);
try
{
stationary
.
off
(
"
carBluetooth
"
,
ActivityEvent
.
ENTER_EXIT
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_009
* @tc.name
* @tc.callback:AsyncCallback<CarBluetoothResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_009
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_009 start
"
);
try
{
stationary
.
once
(
"
carBluetooth
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_004
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_004
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_004 start
"
);
console
.
log
(
JSON
.
stringify
(
stationary
));
try
{
p_done
=
done
;
stationary
.
on
(
"
relativeStill
"
,
3
,
1
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error Log
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_010
* @tc.name
* @tc.callback:AsyncCallback<Type_Unknow>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_010
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_010 start
"
);
try
{
stationary
.
on
(
"
Type_Unknow
"
,
ActivityEvent
.
ENTER_EXIT
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_011
* @tc.name
* @tc.callback:AsyncCallback<Type_Unknow>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_011
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_011 start
"
);
try
{
stationary
.
off
(
"
Type_Unknow
"
,
ActivityEvent
.
ENTER_EXIT
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_005
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_005
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_005 start
"
);
try
{
p_done
=
done
;
stationary
.
once
(
"
relativeStill
"
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_012
* @tc.name
* @tc.callback:AsyncCallback<Type_Unknow>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_012
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_012 start
"
);
try
{
stationary
.
once
(
"
Type_Unknow
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_013
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_013
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_013 start
"
);
try
{
stationary
.
on
(
"
highStill
"
,
ActivityEvent
.
ENTER
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_006
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_006
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_006 start
"
);
setTimeout
(
function
()
{
try
{
p_done
=
done
;
stationary
.
off
(
"
relativeStill
"
,
3
,
pub_callback
);
expect
(
true
).
assertTrue
();
p_done
();
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
},
200
);
})
/**
* @tc.number DeviceStatus_014
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_014
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_014 start
"
);
try
{
stationary
.
off
(
"
highStill
"
,
ActivityEvent
.
ENTER
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_007
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_007
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_007 start
"
);
console
.
log
(
JSON
.
stringify
(
stationary
));
try
{
p_done
=
done
;
stationary
.
on
(
"
Type_Unknow
"
,
3
,
1
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error Log
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_015
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_015
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_015 start
"
);
try
{
stationary
.
once
(
"
highStill
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_016
* @tc.name
* @tc.callback:AsyncCallback<FineStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_016
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_016 start
"
);
try
{
stationary
.
on
(
"
fineStill
"
,
ActivityEvent
.
ENTER
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_008
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_008
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_008 start
"
);
try
{
p_done
=
done
;
stationary
.
once
(
"
Type_Unknow
"
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_017
* @tc.name
* @tc.callback:AsyncCallback<FineStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_017
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_017 start
"
);
try
{
stationary
.
off
(
"
fineStill
"
,
ActivityEvent
.
ENTER
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_018
* @tc.name
* @tc.callback:AsyncCallback<FineStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_018
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_018 start
"
);
try
{
stationary
.
once
(
"
fineStill
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_009
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_009
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_009 start
"
);
setTimeout
(
function
()
{
try
{
p_done
=
done
;
stationary
.
off
(
"
Type_Unknow
"
,
3
,
pub_callback
);
expect
(
true
).
assertTrue
();
p_done
();
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
},
200
);
})
/**
* @tc.number DeviceStatus_019
* @tc.name
* @tc.callback:AsyncCallback<CarBluetoothResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_019
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_019 start
"
);
try
{
stationary
.
on
(
"
carBluetooth
"
,
ActivityEvent
.
ENTER
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_020
* @tc.name
* @tc.callback:AsyncCallback<CarBluetoothResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_020
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_020 start
"
);
try
{
stationary
.
off
(
"
carBluetooth
"
,
ActivityEvent
.
ENTER
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_021
* @tc.name
* @tc.callback:AsyncCallback<CarBluetoothResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_021
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_021 start
"
);
try
{
stationary
.
once
(
"
carBluetooth
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_010
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_010
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_010 start
"
);
console
.
log
(
JSON
.
stringify
(
stationary
));
try
{
p_done
=
done
;
stationary
.
on
(
"
relativeStill
"
,
3
,
1
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error Log
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_022
* @tc.name
* @tc.callback:AsyncCallback<Type_Unknow>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_022
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_022 start
"
);
try
{
stationary
.
on
(
"
Type_Unknow
"
,
ActivityEvent
.
ENTER
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_023
* @tc.name
* @tc.callback:AsyncCallback<Type_Unknow>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_023
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_023 start
"
);
try
{
stationary
.
off
(
"
Type_Unknow
"
,
ActivityEvent
.
ENTER
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_011
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_011
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_011 start
"
);
try
{
p_done
=
done
;
stationary
.
once
(
"
relativeStill
"
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_024
* @tc.name
* @tc.callback:AsyncCallback<Type_Unknow>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_024
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_024 start
"
);
try
{
stationary
.
once
(
"
Type_Unknow
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_025
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_025
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_025 start
"
);
try
{
stationary
.
on
(
"
relativeStill
"
,
ActivityEvent
.
ENTER
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_012
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_012
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_012 start
"
);
setTimeout
(
function
()
{
try
{
p_done
=
done
;
stationary
.
off
(
"
relativeStill
"
,
1
,
pub_callback
);
expect
(
true
).
assertTrue
();
p_done
();
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
},
200
);
})
/**
* @tc.number DeviceStatus_026
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_026
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_026 start
"
);
try
{
stationary
.
off
(
"
relativeStill
"
,
ActivityEvent
.
ENTER
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_027
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_027
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_027 start
"
);
try
{
stationary
.
once
(
"
relativeStill
"
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_013
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_013
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_013 start
"
);
console
.
log
(
JSON
.
stringify
(
stationary
));
try
{
p_done
=
done
;
stationary
.
on
(
"
relativeStill
"
,
3
,
1
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error Log
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
}
})
/**
* @tc.number DeviceStatus_028
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_028
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_028 start
"
);
try
{
stationary
.
on
(
"
relativeStill
"
,
ActivityEvent
.
EXIT
,
1
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
})
/**
* @tc.number DeviceStatus_029
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_029
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_029 start
"
);
try
{
stationary
.
off
(
"
relativeStill
"
,
ActivityEvent
.
EXIT
,
(
data
)
=>
{
expect
(
data
.
state
==
-
1
).
assertTrue
();
/**
* @tc.number DeviceStatus_014
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_014
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_014 start
"
);
try
{
p_done
=
done
;
stationary
.
once
(
"
relativeStill
"
,
pub_callback
);
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
})
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
}
})
/**
* @tc.number DeviceStatus_015
* @tc.name
* @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown
*/
it
(
'
msdp_test_devices_status_015
'
,
0
,
function
(
done
)
{
console
.
log
(
"
msdp_test_devices_status_015 start
"
);
setTimeout
(
function
()
{
try
{
p_done
=
done
;
stationary
.
off
(
"
relativeStill
"
,
2
,
pub_callback
);
expect
(
true
).
assertTrue
();
p_done
();
}
catch
(
error
)
{
console
.
error
(
'
error=
'
+
error
);
done
();
}
},
200
);
})
})
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录