未验证 提交 5342630b 编写于 作者: O openharmony_ci 提交者: Gitee

!9968 refactor:Optimize acts cases of msdp module

Merge pull request !9968 from zyshg/master
...@@ -39,7 +39,7 @@ export default function DeviceStatusUnitTest() { ...@@ -39,7 +39,7 @@ export default function DeviceStatusUnitTest() {
* parameter unknown * parameter unknown
*/ */
it('msdp_test_devices_status_001', 0, function (done) { it('msdp_test_devices_status_001', 0, function (done) {
console.log("msdp_test_devices_status_001 start"); console.log("msdp_test_devices_status_001 on start");
console.log(JSON.stringify(stationary)); console.log(JSON.stringify(stationary));
try { try {
p_done = done; p_done = done;
...@@ -48,17 +48,7 @@ export default function DeviceStatusUnitTest() { ...@@ -48,17 +48,7 @@ export default function DeviceStatusUnitTest() {
console.error('error Log' + error); console.error('error Log' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_001 once start");
/**
* @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 { try {
p_done = done; p_done = done;
stationary.once("still", pub_callback); stationary.once("still", pub_callback);
...@@ -66,17 +56,7 @@ export default function DeviceStatusUnitTest() { ...@@ -66,17 +56,7 @@ export default function DeviceStatusUnitTest() {
console.error('error=' + error); console.error('error=' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_001 off start");
/**
* @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 () { setTimeout(function () {
try { try {
p_done = done; p_done = done;
...@@ -90,16 +70,14 @@ export default function DeviceStatusUnitTest() { ...@@ -90,16 +70,14 @@ export default function DeviceStatusUnitTest() {
}, 200); }, 200);
}) })
/** /**
* @tc.number DeviceStatus_004 * @tc.number DeviceStatus_002
* @tc.name * @tc.name
* @tc.callback:AsyncCallback<HighStillResponse> * @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown * parameter unknown
*/ */
it('msdp_test_devices_status_004', 0, function (done) { it('msdp_test_devices_status_002', 0, function (done) {
console.log("msdp_test_devices_status_004 start"); console.log("msdp_test_devices_status_002 on start");
console.log(JSON.stringify(stationary)); console.log(JSON.stringify(stationary));
try { try {
p_done = done; p_done = done;
...@@ -108,17 +86,7 @@ export default function DeviceStatusUnitTest() { ...@@ -108,17 +86,7 @@ export default function DeviceStatusUnitTest() {
console.error('error Log' + error); console.error('error Log' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_002 once start");
/**
* @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 { try {
p_done = done; p_done = done;
stationary.once("relativeStill", pub_callback); stationary.once("relativeStill", pub_callback);
...@@ -126,17 +94,7 @@ export default function DeviceStatusUnitTest() { ...@@ -126,17 +94,7 @@ export default function DeviceStatusUnitTest() {
console.error('error=' + error); console.error('error=' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_002 off start");
/**
* @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 () { setTimeout(function () {
try { try {
p_done = done; p_done = done;
...@@ -151,13 +109,13 @@ export default function DeviceStatusUnitTest() { ...@@ -151,13 +109,13 @@ export default function DeviceStatusUnitTest() {
}) })
/** /**
* @tc.number DeviceStatus_007 * @tc.number DeviceStatus_003
* @tc.name * @tc.name
* @tc.callback:AsyncCallback<HighStillResponse> * @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown * parameter unknown
*/ */
it('msdp_test_devices_status_007', 0, function (done) { it('msdp_test_devices_status_003', 0, function (done) {
console.log("msdp_test_devices_status_007 start"); console.log("msdp_test_devices_status_003 on start");
console.log(JSON.stringify(stationary)); console.log(JSON.stringify(stationary));
try { try {
p_done = done; p_done = done;
...@@ -166,17 +124,7 @@ export default function DeviceStatusUnitTest() { ...@@ -166,17 +124,7 @@ export default function DeviceStatusUnitTest() {
console.error('error Log' + error); console.error('error Log' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_003 once start");
/**
* @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 { try {
p_done = done; p_done = done;
stationary.once("Type_Unknow", pub_callback); stationary.once("Type_Unknow", pub_callback);
...@@ -184,17 +132,7 @@ export default function DeviceStatusUnitTest() { ...@@ -184,17 +132,7 @@ export default function DeviceStatusUnitTest() {
console.error('error=' + error); console.error('error=' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_003 off start");
/**
* @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 () { setTimeout(function () {
try { try {
p_done = done; p_done = done;
...@@ -208,16 +146,14 @@ export default function DeviceStatusUnitTest() { ...@@ -208,16 +146,14 @@ export default function DeviceStatusUnitTest() {
}, 200); }, 200);
}) })
/** /**
* @tc.number DeviceStatus_010 * @tc.number DeviceStatus_004
* @tc.name * @tc.name
* @tc.callback:AsyncCallback<HighStillResponse> * @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown * parameter unknown
*/ */
it('msdp_test_devices_status_010', 0, function (done) { it('msdp_test_devices_status_004', 0, function (done) {
console.log("msdp_test_devices_status_010 start"); console.log("msdp_test_devices_status_004 on start");
console.log(JSON.stringify(stationary)); console.log(JSON.stringify(stationary));
try { try {
p_done = done; p_done = done;
...@@ -226,17 +162,7 @@ export default function DeviceStatusUnitTest() { ...@@ -226,17 +162,7 @@ export default function DeviceStatusUnitTest() {
console.error('error Log' + error); console.error('error Log' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_004 once start");
/**
* @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 { try {
p_done = done; p_done = done;
stationary.once("relativeStill", pub_callback); stationary.once("relativeStill", pub_callback);
...@@ -244,17 +170,7 @@ export default function DeviceStatusUnitTest() { ...@@ -244,17 +170,7 @@ export default function DeviceStatusUnitTest() {
console.error('error=' + error); console.error('error=' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_004 off start");
/**
* @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 () { setTimeout(function () {
try { try {
p_done = done; p_done = done;
...@@ -268,15 +184,14 @@ export default function DeviceStatusUnitTest() { ...@@ -268,15 +184,14 @@ export default function DeviceStatusUnitTest() {
}, 200); }, 200);
}) })
/** /**
* @tc.number DeviceStatus_013 * @tc.number DeviceStatus_005
* @tc.name * @tc.name
* @tc.callback:AsyncCallback<HighStillResponse> * @tc.callback:AsyncCallback<HighStillResponse>
* parameter unknown * parameter unknown
*/ */
it('msdp_test_devices_status_013', 0, function (done) { it('msdp_test_devices_status_005', 0, function (done) {
console.log("msdp_test_devices_status_013 start"); console.log("msdp_test_devices_status_005 on start");
console.log(JSON.stringify(stationary)); console.log(JSON.stringify(stationary));
try { try {
p_done = done; p_done = done;
...@@ -285,17 +200,7 @@ export default function DeviceStatusUnitTest() { ...@@ -285,17 +200,7 @@ export default function DeviceStatusUnitTest() {
console.error('error Log' + error); console.error('error Log' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_005 once start");
/**
* @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 { try {
p_done = done; p_done = done;
stationary.once("relativeStill", pub_callback); stationary.once("relativeStill", pub_callback);
...@@ -303,17 +208,7 @@ export default function DeviceStatusUnitTest() { ...@@ -303,17 +208,7 @@ export default function DeviceStatusUnitTest() {
console.error('error=' + error); console.error('error=' + error);
done(); done();
} }
}) console.log("msdp_test_devices_status_005 off start");
/**
* @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 () { setTimeout(function () {
try { try {
p_done = done; p_done = done;
...@@ -326,6 +221,5 @@ export default function DeviceStatusUnitTest() { ...@@ -326,6 +221,5 @@ export default function DeviceStatusUnitTest() {
} }
}, 200); }, 200);
}) })
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册