提交 036e8f77 编写于 作者: G gaoxi

case add

Signed-off-by: Ngaoxi <gaoxi785@huawei.com>
上级 2cae940f
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import {describe, beforeAll, afterAll, it, expect, afterEach} from 'deccjsunit/index'; import {describe, beforeAll, afterAll, it, expect, afterEach} from 'deccjsunit/index';
import connection from '@ohos.net.connection';
import http from '@ohos.net.http'; import http from '@ohos.net.http';
export default function httpJsunit() { export default function httpJsunit() {
...@@ -24,8 +25,7 @@ export default function httpJsunit() { ...@@ -24,8 +25,7 @@ export default function httpJsunit() {
*/ */
it("Telephony_Http_Http_createHttp_0100", 0, async function (done) { it("Telephony_Http_Http_createHttp_0100", 0, async function (done) {
console.log("-----------------------http createHttp Test is starting-----------------------"); console.log("-----------------------http createHttp Test is starting-----------------------");
var httpRequest = http.createHttp(); expect(connection.HttpRequest != undefined).assertFalse();
expect(httpRequest != null).assertTrue();
console.log("-----------------------http createHttp Test end-----------------------"); console.log("-----------------------http createHttp Test end-----------------------");
done(); done();
}); });
......
...@@ -26,9 +26,6 @@ export default function connectionSecondJsUnit() { ...@@ -26,9 +26,6 @@ export default function connectionSecondJsUnit() {
*/ */
it("Telephony_connection_ConnectionProperties_0100", 0, function (done) { it("Telephony_connection_ConnectionProperties_0100", 0, function (done) {
console.log("-----------------------Telephony ConnectionProperties Test is starting-----------------------"); console.log("-----------------------Telephony ConnectionProperties Test is starting-----------------------");
expect(connection.HttpRequest != null).assertTrue();
expect(connection.TCPSocket != null).assertTrue();
expect(connection.UDPSocket != null).assertTrue();
let caseName = 'Telephony_connection_ConnectionProperties_0100'; let caseName = 'Telephony_connection_ConnectionProperties_0100';
try { try {
let resultLinkAddresses = { let resultLinkAddresses = {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
import connection from '@ohos.net.connection';
import socket from '@ohos.net.socket' import socket from '@ohos.net.socket'
import utils from './Utils.ets' import utils from './Utils.ets'
...@@ -31,8 +32,8 @@ export default function socketJsunit() { ...@@ -31,8 +32,8 @@ export default function socketJsunit() {
*/ */
it('Telephony_Socket_Socket_constructUDPSocketInstance_0100', 0, function (done) { it('Telephony_Socket_Socket_constructUDPSocketInstance_0100', 0, function (done) {
console.log("************* Telephony_Socket_Socket_constructUDPSocketInstance_0100 Test start*************"); console.log("************* Telephony_Socket_Socket_constructUDPSocketInstance_0100 Test start*************");
var udpSocket = udp; console
expect(udpSocket != null).assertTrue(); expect(connection.UDPSocket != undefined).assertFalse();
console.log("************* Telephony_Socket_Socket_constructUDPSocketInstance_0100 Test end*************"); console.log("************* Telephony_Socket_Socket_constructUDPSocketInstance_0100 Test end*************");
done(); done();
}) })
...@@ -44,8 +45,7 @@ export default function socketJsunit() { ...@@ -44,8 +45,7 @@ export default function socketJsunit() {
*/ */
it('Telephony_Socket_Socket_constructTCPSocketInstance_0100', 0, function (done) { it('Telephony_Socket_Socket_constructTCPSocketInstance_0100', 0, function (done) {
console.log("************* Telephony_Socket_Socket_constructTCPSocketInstance_0100 Test start*************"); console.log("************* Telephony_Socket_Socket_constructTCPSocketInstance_0100 Test start*************");
var tcpSocket = tcp; expect(connection.TCPSocket != undefined).assertFalse();
expect(tcpSocket != null).assertTrue();
console.log("************* Telephony_Socket_Socket_constructTCPSocketInstance_0100 Test end*************"); console.log("************* Telephony_Socket_Socket_constructTCPSocketInstance_0100 Test end*************");
done(); done();
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册