提交 310de4cd 编写于 作者: Z zhangfuzhi

接口规格变化,用例适配

Signed-off-by: Nzhangfuzhi <zhangfuzhi1@huawei.com>
上级 8f662e7d
...@@ -35,7 +35,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -35,7 +35,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
console.log("Telephony_NetworkManager_register_Async_0100 register "); console.log("Telephony_NetworkManager_register_Async_0100 register ");
if (error) { if (error) {
console.info(caseName + " register fail: " + JSON.stringify(error)); console.info(caseName + " register fail: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
...@@ -57,7 +57,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -57,7 +57,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
console.log("Telephony_NetworkManager_register_Async_0100 unregister "); console.log("Telephony_NetworkManager_register_Async_0100 unregister ");
if (error) { if (error) {
console.info(caseName + " register fail: " + JSON.stringify(error)); console.info(caseName + " register fail: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -106,7 +106,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -106,7 +106,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregisterresult: " + JSON.stringify(error)); console.info(caseName + " unregisterresult: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -158,7 +158,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -158,7 +158,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -210,7 +210,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -210,7 +210,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregisterresult: " + JSON.stringify(error)); console.info(caseName + " unregisterresult: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -262,7 +262,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -262,7 +262,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -314,7 +314,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -314,7 +314,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregisterresult: " + JSON.stringify(error)); console.info(caseName + " unregisterresult: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -366,7 +366,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -366,7 +366,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -418,7 +418,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -418,7 +418,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -469,7 +469,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -469,7 +469,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -521,7 +521,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -521,7 +521,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -574,7 +574,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -574,7 +574,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -627,7 +627,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -627,7 +627,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -681,7 +681,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -681,7 +681,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -735,7 +735,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -735,7 +735,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -788,7 +788,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -788,7 +788,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -842,7 +842,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -842,7 +842,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -895,7 +895,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -895,7 +895,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -930,7 +930,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -930,7 +930,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
...@@ -944,7 +944,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -944,7 +944,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn1.unregister((error) => { netConn1.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -981,7 +981,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -981,7 +981,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -1034,7 +1034,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1034,7 +1034,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister fail " + error); console.info(caseName + " unregister fail " + error);
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -1068,7 +1068,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1068,7 +1068,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
...@@ -1084,14 +1084,14 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1084,14 +1084,14 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn1.register(function (error) { netConn1.register(function (error) {
if (error) { if (error) {
console.info(caseName + " register fail: " + JSON.stringify(error)); console.info(caseName + " register fail: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
netConn1.unregister((error) => { netConn1.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -1127,7 +1127,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1127,7 +1127,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
...@@ -1143,14 +1143,14 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1143,14 +1143,14 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn1.register(function (error) { netConn1.register(function (error) {
if (error) { if (error) {
console.info(caseName + " register fail: " + JSON.stringify(error)); console.info(caseName + " register fail: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
netConn1.unregister((error) => { netConn1.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -1172,7 +1172,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1172,7 +1172,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.register(function (error) { netConn.register(function (error) {
if (error) { if (error) {
console.info(caseName + " register fail: " + JSON.stringify(error)); console.info(caseName + " register fail: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
...@@ -1197,7 +1197,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1197,7 +1197,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -1249,7 +1249,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1249,7 +1249,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -1270,7 +1270,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1270,7 +1270,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.register(function (error) { netConn.register(function (error) {
if (error) { if (error) {
console.info(caseName + " register fail: " + JSON.stringify(error)); console.info(caseName + " register fail: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
...@@ -1295,7 +1295,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1295,7 +1295,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
...@@ -1315,7 +1315,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1315,7 +1315,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.register(function (error) { netConn.register(function (error) {
if (error) { if (error) {
console.info(caseName + " register fail: " + JSON.stringify(error)); console.info(caseName + " register fail: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
return; return;
} }
...@@ -1341,7 +1341,7 @@ export default function Telephony_NetworkManagerRegisterTest() { ...@@ -1341,7 +1341,7 @@ export default function Telephony_NetworkManagerRegisterTest() {
netConn.unregister((error) => { netConn.unregister((error) => {
if (error) { if (error) {
console.info(caseName + " unregister result: " + JSON.stringify(error)); console.info(caseName + " unregister result: " + JSON.stringify(error));
expect().assertFail(); expect(true).assertFalse();
done(); done();
} }
done(); done();
......
...@@ -149,12 +149,13 @@ export default function ActsBaseCallManagerTest() { ...@@ -149,12 +149,13 @@ export default function ActsBaseCallManagerTest() {
countryCode: 'CN' countryCode: 'CN'
}, (err, data) => { }, (err, data) => {
if (err) { if (err) {
console.log(`Telephony_CallManager_formatPhoneNumber_Async_0200 finish = ${err.message}`); console.log("Telephony_CallManager_formatPhoneNumber_Async_0200 fail = ${err.message}" + JSON.stringify(err));
expect().assertFail();
done(); done();
return; return;
} }
expect().assertFail(); expect(data === '10 000 000 0000').assertTrue();
console.log('Telephony_CallManager_formatPhoneNumber_Async_0200 fail'); console.log('Telephony_CallManager_formatPhoneNumber_Async_0200 finish' + JSON.stringify(data));
done(); done();
}); });
}); });
...@@ -212,14 +213,15 @@ export default function ActsBaseCallManagerTest() { ...@@ -212,14 +213,15 @@ export default function ActsBaseCallManagerTest() {
it('Telephony_CallManager_formatPhoneNumber_Async_0500', 0, async function (done) { it('Telephony_CallManager_formatPhoneNumber_Async_0500', 0, async function (done) {
call.formatPhoneNumber('666666999999', { call.formatPhoneNumber('666666999999', {
countryCode: 'CN' countryCode: 'CN'
}, (err) => { }, (err, data) => {
if (err) { if (err) {
console.log(`Telephony_CallManager_formatPhoneNumber_Async_0500 finish err = ${err.message}`); console.log("Telephony_CallManager_formatPhoneNumber_Async_0500 fail err =" + JSON.stringify(err));
expect().assertFail();
done(); done();
return; return;
} }
console.log('Telephony_CallManager_formatPhoneNumber_Async_0500 fail'); console.log('Telephony_CallManager_formatPhoneNumber_Async_0500 finish ' + JSON.stringify(data));
expect().assertFail(); expect(data === '666666999999').assertTrue();
done(); done();
}); });
}); });
...@@ -296,13 +298,12 @@ export default function ActsBaseCallManagerTest() { ...@@ -296,13 +298,12 @@ export default function ActsBaseCallManagerTest() {
await call.formatPhoneNumber('010-100-0000', { await call.formatPhoneNumber('010-100-0000', {
countryCode: 'CN' countryCode: 'CN'
}); });
expect().assertFail(); console.log('Telephony_CallManager_formatPhoneNumber_Promise_0200 finish');
console.log('Telephony_CallManager_formatPhoneNumber_Promise_0200 fail');
done(); done();
} catch (err) { } catch (err) {
console.log(`Telephony_CallManager_formatPhoneNumber_Promise_0200 finish err = ${err}`); console.log("Telephony_CallManager_formatPhoneNumber_Promise_0200 finish err = ${err}" + JSON.stringify(err));
expect().assertFail();
done(); done();
} }
}); });
...@@ -361,12 +362,11 @@ export default function ActsBaseCallManagerTest() { ...@@ -361,12 +362,11 @@ export default function ActsBaseCallManagerTest() {
await call.formatPhoneNumber('666666999999', { await call.formatPhoneNumber('666666999999', {
countryCode: 'CN' countryCode: 'CN'
}); });
console.log('Telephony_CallManager_formatPhoneNumber_Promise_0500 fail'); console.log('Telephony_CallManager_formatPhoneNumber_Promise_0500 finish');
expect().assertFail();
done(); done();
return;
} catch (err) { } catch (err) {
console.log(`Telephony_CallManager_formatPhoneNumber_Promise_0500 finish err = ${err.message}`); console.log("Telephony_CallManager_formatPhoneNumber_Promise_0500 finish err = ${err.message}" + JSON.stringify(err));
expect().assertFail();
done(); done();
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册