diff --git a/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionJsunit.test.ets b/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionJsunit.test.ets index 465a0512d2adabd022a5c61409d7fc29d368e01f..6276e18a597ca3188a0dd52360cf3259ad0ae89d 100644 --- a/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionJsunit.test.ets +++ b/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionJsunit.test.ets @@ -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 diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js b/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js index 77e8a0fe68fe6a2e5a6e5e502031ffd88e5d7bf1..6d8a34bf3ffa9654cca910fe4447e79d87da6815 100644 --- a/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js @@ -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