未验证 提交 10b4a8fe 编写于 作者: O openharmony_ci 提交者: Gitee

!5212 补充电话服务接口覆盖率用例

Merge pull request !5212 from 高曦/master
......@@ -15,6 +15,8 @@
*/
import {describe, it, expect} from 'hypium/index';
import connection from '@ohos.net.connection'
import http from "@ohos.net.http";
import socket from "@ohos.net.socket";
import utils from './Utils.ets'
export default function connectionJsunit() {
......@@ -25,6 +27,19 @@ export default function connectionJsunit() {
const NETID_IVVALID2 = 0;
console.log("************* connection Test start*************");
it('Telephony_Connection_Request_Socket_0100', 0, function (done) {
type HttpRequest = http.HttpRequest
;
type TCPSocket = socket.TCPSocket
;
type UDPSocket = socket.UDPSocket
;
expect(typeof HttpRequest == typeof connection.HttpRequest).assertTrue();
expect(typeof TCPSocket == typeof connection.TCPSocket).assertTrue();
expect(typeof UDPSocket == typeof connection.UDPSocket).assertTrue();
done();
});
/*
* @tc.number : Telephony_Connection_Connection_createNetConnection_0100
* @tc.name : createNetConnection
......
......@@ -52,6 +52,24 @@ describe('SimManagerTest', function () {
}
});
it('Telephony_Sim_getDefaultVoiceSlotId_0100', 0, async function (done) {
sim.getDefaultVoiceSlotId((err, data) => {
expect(data === null).assertFalse();
done();
});
});
it('Telephony_Sim_getDefaultVoiceSlotId_0200', 0, async function (done) {
let promise = sim.getDefaultVoiceSlotId();
promise.then(data => {
expect(data === null).assertFalse();
done();
}).catch(err => {
expect(err === null).assertFalse();
done();
});
});
/**
* @tc.number Telephony_Sim_constantValidate_0100
* @tc.name SIM card constant validation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册