未验证 提交 75ba249e 编写于 作者: 杜智海 提交者: Gitee

update ability/dmsfwk/continuationmanagertest/src/main/js/test/ContinuationManagerJsunit.test.js.

Signed-off-by: N杜智海 <duzhihai@huawei.com>
上级 7efe5599
...@@ -351,7 +351,7 @@ describe('continuationManagerTest', function() { ...@@ -351,7 +351,7 @@ describe('continuationManagerTest', function() {
}); });
} catch (e) { } catch (e) {
console.info("testRegisterContinuation002 " + e); console.info("testRegisterContinuation002 " + e);
expect(err.code == 401).assertTrue(); expect(e.code == 401).assertTrue();
done(); done();
} }
}) })
...@@ -694,7 +694,7 @@ describe('continuationManagerTest', function() { ...@@ -694,7 +694,7 @@ describe('continuationManagerTest', function() {
done(); done();
} catch (e) { } catch (e) {
console.info("testUnregisterContinuation002 " + e); console.info("testUnregisterContinuation002 " + e);
expect(err.code == 401).assertTrue(); expect(e.code == 401).assertTrue();
done(); done();
} }
}) })
...@@ -800,13 +800,13 @@ describe('continuationManagerTest', function() { ...@@ -800,13 +800,13 @@ describe('continuationManagerTest', function() {
*/ */
it('testOn003', 0, async function(done) { it('testOn003', 0, async function(done) {
try { try {
continuationManager.on("deviceSelected", 999, function (data) { continuationManager.on("deviceSelected", "invalid token", function (data) {
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
}) })
done(); done();
} catch (e) { } catch (e) {
console.info("testOn003 " + e); console.info("testOn003 " + e);
expect(e.code == 16600002).assertTrue(); expect(e.code != 401).assertTrue();
done(); done();
} }
}) })
...@@ -818,13 +818,13 @@ describe('continuationManagerTest', function() { ...@@ -818,13 +818,13 @@ describe('continuationManagerTest', function() {
*/ */
it('testOn004', 0, async function(done) { it('testOn004', 0, async function(done) {
try { try {
continuationManager.on("deviceUnselected", 999, function (data) { continuationManager.on("deviceUnselected", "invalid token", function (data) {
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
}); });
done(); done();
} catch (e) { } catch (e) {
console.info("testOn004 " + e); console.info("testOn004 " + e);
expect(e.code == 16600002).assertTrue(); expect(e.code == 401).assertTrue();
done(); done();
} }
}) })
...@@ -872,11 +872,11 @@ describe('continuationManagerTest', function() { ...@@ -872,11 +872,11 @@ describe('continuationManagerTest', function() {
*/ */
it('testOff003', 0, async function(done) { it('testOff003', 0, async function(done) {
try { try {
continuationManager.off("deviceSelected", 999); continuationManager.off("deviceSelected", "invalid token");
done(); done();
} catch (e) { } catch (e) {
console.info("testOff003 " + e); console.info("testOff003 " + e);
expect(e.code == 16600002).assertTrue(); expect(e.code == 401).assertTrue();
done(); done();
} }
}) })
...@@ -888,11 +888,11 @@ describe('continuationManagerTest', function() { ...@@ -888,11 +888,11 @@ describe('continuationManagerTest', function() {
*/ */
it('testOff004', 0, async function(done) { it('testOff004', 0, async function(done) {
try { try {
continuationManager.off("deviceUnselected", 999); continuationManager.off("deviceUnselected", "invalid token");
done(); done();
} catch (e) { } catch (e) {
console.info("testOff004 " + e); console.info("testOff004 " + e);
expect(e.code == 16600002).assertTrue(); expect(e.code == 401).assertTrue();
done(); done();
} }
}) })
...@@ -1170,7 +1170,7 @@ describe('continuationManagerTest', function() { ...@@ -1170,7 +1170,7 @@ describe('continuationManagerTest', function() {
done(); done();
} catch (e) { } catch (e) {
console.info("testStartContinuationDeviceManager003 " + e); console.info("testStartContinuationDeviceManager003 " + e);
eexpect(e.code == 401).assertTrue(); expect(e.code == 401).assertTrue();
done(); done();
} }
}) })
...@@ -1486,7 +1486,7 @@ describe('continuationManagerTest', function() { ...@@ -1486,7 +1486,7 @@ describe('continuationManagerTest', function() {
done(); done();
} catch (e) { } catch (e) {
console.info("testUpdateContinuationState002 " + e); console.info("testUpdateContinuationState002 " + e);
expect(err.code == 401).assertTrue(); expect(e.code == 401).assertTrue();
done(); done();
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册