Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1b859b2f
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1b859b2f
编写于
11月 09, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6394 电话用例整改
Merge pull request !6394 from zhangfuzhi/master
上级
4c984031
51df72c6
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
902 addition
and
35 deletion
+902
-35
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js
...anager_ims2_call/src/main/js/test/ObjectInterface_test.js
+8
-6
telephony/telephonyjstest/netmanager_base/network_nopermission/src/main/js/test/Http.nopermission.test.js
...k_nopermission/src/main/js/test/Http.nopermission.test.js
+4
-12
telephony/telephonyjstest/netmanager_base/register/Test.json
telephony/telephonyjstest/netmanager_base/register/Test.json
+8
-0
telephony/telephonyjstest/netmanager_base/register/src/main/js/test/NetworkManagerRegister.test.js
.../register/src/main/js/test/NetworkManagerRegister.test.js
+16
-0
telephony/telephonyjstest/netmanager_base/socket/src/main/js/test/NetStackSocket.test.js
...nager_base/socket/src/main/js/test/NetStackSocket.test.js
+141
-1
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionJsunit.test.ets
..._socket/entry/src/main/ets/test/ConnectionJsunit.test.ets
+241
-0
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionSecondJsUnit.test.ets
...t/entry/src/main/ets/test/ConnectionSecondJsUnit.test.ets
+67
-0
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/SocketJsunit.test.ets
...ager_socket/entry/src/main/ets/test/SocketJsunit.test.ets
+417
-16
未找到文件。
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js
浏览文件 @
1b859b2f
...
...
@@ -417,7 +417,7 @@ export default function ObjectInterfaceTest() {
try
{
var
resultSet
=
await
contactsapi
.
queryContact
(
queryId
);
console
.
info
(
"
contactsApi_query_contact_test_400 : query resultSet =
"
+
JSON
.
stringify
(
resultSet
));
expect
(
resultSet
!=
null
).
assertTrue
();
expect
(
resultSet
==
undefined
).
assertTrue
();
done
();
}
catch
(
error
)
{
console
.
info
(
"
contactsApi_query_contact_test_400 query error =
"
+
error
);
...
...
@@ -437,7 +437,7 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
var
queryId
=
gRawContactId
.
toString
()
;
var
queryId
=
gRawContactId
;
var
holder
=
{
bundleName
:
"
com.ohos.contacts
"
,
displayName
:
"
phone
"
,
holderId
:
1
}
...
...
@@ -445,7 +445,8 @@ export default function ObjectInterfaceTest() {
expect
(
holder
.
displayName
===
null
).
assertFalse
();
expect
(
holder
.
holderId
!=
0
).
assertTrue
();
try
{
var
resultSet
=
await
contactsapi
.
queryContact
(
queryId
,
holder
);
var
findKey
=
contactsapi
.
queryKey
(
queryId
);
var
resultSet
=
await
contactsapi
.
queryContact
(
findKey
,
holder
);
console
.
info
(
"
contactsApi_query_contact_test_500 : query resultSet =
"
+
JSON
.
stringify
(
resultSet
));
expect
(
resultSet
===
null
).
assertFalse
();
done
();
...
...
@@ -467,7 +468,7 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
var
queryId
=
gRawContactId
.
toString
()
;
var
queryId
=
gRawContactId
;
var
holder
=
{
bundleName
:
"
com.ohos.contacts
"
,
displayName
:
"
phone
"
,
holderId
:
1
};
...
...
@@ -475,7 +476,8 @@ export default function ObjectInterfaceTest() {
attributes
:
[
1
,
5
,
6
]
}
try
{
var
resultSet
=
await
contactsapi
.
queryContact
(
queryId
,
holder
,
ContactAttributes
);
var
findKey
=
contactsapi
.
queryKey
(
queryId
);
var
resultSet
=
await
contactsapi
.
queryContact
(
findKey
,
holder
,
ContactAttributes
);
console
.
info
(
"
contactsApi_query_contact_test_600 : query resultSet =
"
+
JSON
.
stringify
(
resultSet
));
expect
(
resultSet
===
null
).
assertFalse
();
done
();
...
...
@@ -1051,7 +1053,7 @@ export default function ObjectInterfaceTest() {
try
{
var
updateCode
=
await
contactsapi
.
updateContact
(
updateValues
,
condition
);
console
.
info
(
"
abnormal_contactsApi_update_test_3000 : updateCode =
"
+
updateCode
);
expect
(
updateCode
===
-
1
).
assert
Fals
e
();
expect
(
updateCode
===
-
1
).
assert
Tru
e
();
done
();
}
catch
(
error
)
{
console
.
info
(
"
abnormal_contactsApi_update_test_3000 : update error =
"
+
error
);
...
...
telephony/telephonyjstest/netmanager_base/network_nopermission/src/main/js/test/Http.nopermission.test.js
浏览文件 @
1b859b2f
...
...
@@ -32,15 +32,12 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail
:
function
(
data
,
code
){
console
.
info
(
"
NetManager code
"
+
code
)
expect
(
code
==
=
602
).
assertTrue
()
expect
(
code
==
602
).
assertTrue
()
done
();
},
complete
:
function
(){
expect
().
assertTrue
()
done
();
}
})
done
();
});
/**
...
...
@@ -56,15 +53,12 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail
:
function
(
data
,
code
){
console
.
info
(
"
NetManager code
"
+
code
)
expect
(
code
==
=
602
).
assertTrue
()
expect
(
code
==
602
).
assertTrue
()
done
();
},
complete
:
function
(){
expect
().
assertTrue
()
done
();
}
})
done
();
});
/**
...
...
@@ -80,11 +74,10 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail
:
function
(
data
,
code
){
console
.
info
(
"
NetManager code
"
+
code
)
expect
(
code
==
=
602
).
assertTrue
()
expect
(
code
==
602
).
assertTrue
()
done
();
}
})
done
();
})
/**
...
...
@@ -100,11 +93,10 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail
:
function
(
data
,
code
){
console
.
info
(
"
NetManager code
"
+
code
)
expect
(
code
==
=
602
).
assertTrue
()
expect
(
code
==
602
).
assertTrue
()
done
();
}
})
done
();
})
});
...
...
telephony/telephonyjstest/netmanager_base/register/Test.json
浏览文件 @
1b859b2f
...
...
@@ -15,6 +15,14 @@
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -m 425 1000 425 500 400"
]
}
]
}
telephony/telephonyjstest/netmanager_base/register/src/main/js/test/NetworkManagerRegister.test.js
浏览文件 @
1b859b2f
...
...
@@ -29,6 +29,7 @@
const
TIMEOUT
=
100
;
const
TIMEOUT_1
=
1000
;
let
VALUE
=
0
;
let
envReady
=
false
;
function
sleep
(
timeout
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -2258,6 +2259,11 @@
* @tc.desc Function test
*/
it
(
'
Telephony_NetworkManager_unregister_Async_0100
'
,
0
,
async
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
caseName
=
'
Telephony_NetworkManager_unregister_Async_0100
'
;
let
netSpecifier
=
{
netCapabilities
:
{
...
...
@@ -2353,6 +2359,11 @@
* @tc.desc Function test
*/
it
(
'
Telephony_NetworkManager_unregister_Async_0200
'
,
0
,
async
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
caseName
=
'
Telephony_NetworkManager_unregister_Async_0200
'
;
let
netConn
=
connection
.
createNetConnection
();
netConn
.
on
(
'
netAvailable
'
,
(
error
,
value
)
=>
{
...
...
@@ -2439,6 +2450,11 @@
* @tc.desc Function test
*/
it
(
'
Telephony_NetworkManager_unregister_Async_0300
'
,
0
,
async
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
caseName
=
'
Telephony_NetworkManager_unregister_Async_0300
'
;
let
netConn
=
connection
.
createNetConnection
();
netConn
.
on
(
'
netAvailable
'
,
(
error
,
value
)
=>
{
...
...
telephony/telephonyjstest/netmanager_base/socket/src/main/js/test/NetStackSocket.test.js
浏览文件 @
1b859b2f
...
...
@@ -19,7 +19,7 @@ export default function Telephony_NETSTACK_SocketTest() {
describe
(
'
Telephony_NETSTACK_SocketTest
'
,
function
()
{
let
envReady
=
false
;
/**
* @tc.number Telephony_NetStack_UDPTest0100
...
...
@@ -28,6 +28,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0100
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
bind
({
address
:
"
127.0.0.1
"
,
...
...
@@ -47,6 +52,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0200
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
bind
({
address
:
"
127.0.0.1
"
,
...
...
@@ -66,6 +76,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0300
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
send
({
address
:
{
...
...
@@ -88,6 +103,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0400
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
send
({
address
:
{
...
...
@@ -110,6 +130,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0500
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
close
(
function
(
err
,
data
)
{
expect
(
err
!==
undefined
).
assertTrue
()
...
...
@@ -125,6 +150,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0600
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
close
().
then
(
function
(
data
)
{
expect
(
data
!==
undefined
).
assertTrue
()
...
...
@@ -140,6 +170,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0700
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
getState
(
function
(
err
,
data
)
{
expect
(
err
!==
undefined
).
assertTrue
()
...
...
@@ -155,6 +190,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0800
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
getState
().
then
(
function
(
data
)
{
expect
(
data
!==
undefined
).
assertTure
()
...
...
@@ -170,6 +210,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest0900
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
setExtraOptions
({},
function
(
err
,
data
)
{
expect
(
err
!==
undefined
).
assertTure
()
...
...
@@ -185,6 +230,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest1000
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
setExtraOptions
({},).
then
(
function
(
date
)
{
expect
(
date
!==
undefined
).
assertTrue
()
...
...
@@ -200,6 +250,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest1100
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
on
(
'
message
'
,
function
()
{
expect
().
assertFail
()
...
...
@@ -227,6 +282,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest1200
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
on
(
'
message
'
,
function
()
{
})
...
...
@@ -262,6 +322,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0100
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
bind
({
address
:
"
127.0.0.1
"
,
...
...
@@ -281,6 +346,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0200
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
bind
({
address
:
"
127.0.0.1
"
,
...
...
@@ -300,6 +370,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0300
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
send
({
data
:
"
Hello
"
...
...
@@ -317,6 +392,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0400
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
send
({
data
:
"
Hello
"
...
...
@@ -334,6 +414,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0500
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
close
(
function
(
err
,
data
)
{
expect
(
err
!==
undefined
).
assertTrue
()
...
...
@@ -349,6 +434,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0600
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
close
().
then
(
function
(
data
)
{
expect
(
data
!==
undefined
).
assertTrue
()
...
...
@@ -364,6 +454,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0700
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
getState
(
function
(
err
,
data
)
{
expect
(
err
!==
undefined
).
assertTrue
()
...
...
@@ -379,6 +474,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0800
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
getState
().
then
(
function
(
data
)
{
expect
(
data
!==
undefined
).
assertTure
()
...
...
@@ -394,6 +494,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest0900
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
setExtraOptions
({},
function
(
err
,
data
)
{
expect
(
err
!==
undefined
).
assertTure
()
...
...
@@ -409,6 +514,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest1000
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
setExtraOptions
({},).
then
(
function
(
date
)
{
expect
(
date
!==
undefined
).
assertTrue
()
...
...
@@ -424,6 +534,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest1100
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
on
(
'
message
'
,
function
()
{
expect
().
assertFail
()
...
...
@@ -451,6 +566,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest1200
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
on
(
'
message
'
,
function
()
{
})
...
...
@@ -485,6 +605,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test
*/
it
(
'
Telephony_NetStack_TCPTest1300
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
getRemoteAddress
(
function
(
err
,
data
)
{
expect
(
err
!==
undefined
).
assertTure
()
...
...
@@ -499,6 +624,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test
*/
it
(
'
Telephony_NetStack_TCPTest1400
'
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
getRemoteAddress
().
then
(
function
(
data
)
{
expect
(
data
!==
undefined
).
assertTure
()
...
...
@@ -513,6 +643,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test
*/
it
(
"
Telephony_NetStack_TCPTest_1500
"
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
TCP
=
netSocket
.
constructTCPSocketInstance
()
TCP
.
connect
({
address
:
{
...
...
@@ -534,6 +669,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test
*/
it
(
"
Telephony_NetStack_TCPTest_1600
"
,
0
,
function
(
done
)
{
if
(
!
envReady
)
{
console
.
info
(
"
The environment was not ready
"
);
done
();
return
;
}
let
TCP
=
netSocket
.
constructTCPSocketInstance
()
TCP
.
connect
({
address
:
{
...
...
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionJsunit.test.ets
浏览文件 @
1b859b2f
此差异已折叠。
点击以展开。
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/ConnectionSecondJsUnit.test.ets
浏览文件 @
1b859b2f
...
...
@@ -19,12 +19,19 @@ import utils from './Utils.ets'
export default function connectionSecondJsUnit() {
describe("connectionSecondJsunit", function () {
let envReady = false;
/**
* @tc.name: Telephony_connection_ConnectionProperties_0100
* @tc.desc: ConnectionProperties Properties detection
* @tc.author: kangyuntao
*/
it("Telephony_connection_ConnectionProperties_0100", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony ConnectionProperties Test is starting-----------------------");
let caseName = 'Telephony_connection_ConnectionProperties_0100';
try {
...
...
@@ -74,6 +81,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it('Telephony_connection_getConnectionProperties_Async_0200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getConnectionProperties Test is starting-----------------------");
if(false){
expect(true).assertTrue();
...
...
@@ -119,6 +131,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it("Telephony_connection_RouteInfo_0300", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("----------------------RouteInfo Properties Test is starting-----------------------");
try {
let resultInterface = {
...
...
@@ -158,6 +175,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it('Telephony_connection_getRouteInfo_Async_0400', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getRouteInfo Test is starting-----------------------");
let caseName = 'Telephony_connection_getRouteInfo_Async_0400';
connection.getAllNets((error, value) => {
...
...
@@ -195,6 +217,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it("Telephony_connection_LinkAddress_0500", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("----------------------LinkAddress Properties Test is starting-----------------------");
try {
let resultPrefixLength = {
...
...
@@ -214,6 +241,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it('Telephony_connection_getLinkAddress_Async_0600', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getLinkAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getLinkAddress_Async_0600';
connection.getAllNets((error, value) => {
...
...
@@ -249,6 +281,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it("Telephony_connection_NetAddress_0700", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("----------------------NetAddress Properties Test is starting-----------------------");
try {
let resultPort = {
...
...
@@ -268,6 +305,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetAddress_Async_0800', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetAddress_Async_0800';
connection.getAllNets((error, value) => {
...
...
@@ -303,6 +345,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it("Telephony_connection_NetCap_0900", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony NetCap Properties Test is starting-----------------------");
if (false) {
expect(true).assertTrue();
...
...
@@ -329,6 +376,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetCap_Async_1000', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetCap Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCap_Async_1000';
connection.getAllNets((error, value) => {
...
...
@@ -362,6 +414,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it("Telephony_connection_NetBearType_1100", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony NetBearType Properties Test is starting-----------------------");
if (false) {
expect(true).assertTrue();
...
...
@@ -385,6 +442,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetBearType_Async_1200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetBearType Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetBearType_Async_1200';
connection.getAllNets((error, value) => {
...
...
@@ -418,6 +480,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetCapabilities_Promise_1300', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetCapabilities Promise Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCapabilities_Promise_1300';
connection.getAllNets().then((handle) => {
...
...
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/SocketJsunit.test.ets
浏览文件 @
1b859b2f
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录