You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When device is connected to network, or in case of wireless device near
63
-
the access point.
60
+
When device is connected to network, or if a wireless device is near
61
+
the access point:
64
62
65
63
```.sh
66
64
mbed test -n mbed-os-tests-network-interface
@@ -75,19 +73,19 @@ Test cases for NetworkInterface class
75
73
76
74
Test `NetworkInterface::connect()` and `NetworkInterface::disconnect()`
77
75
78
-
**Preconditions:**
76
+
**Precondition:**
79
77
80
-
1.Network interface is initialized.
78
+
Network interface is initialized.
81
79
82
80
**Test steps:**
83
81
84
-
1. Connect interface
85
-
2. Disconnect interface
86
-
3. Repeat connect and disconnect steps 1 to 2 four times
82
+
1. Connect interface.
83
+
2. Disconnect interface.
84
+
3. Repeat connect and disconnect steps 1 to 2 four times.
87
85
88
86
**Expected result:**
89
87
90
-
`Connect()` and `disconnect()` calls return NSAPI_ERROR_OK.
88
+
`Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`.
91
89
92
90
### NETWORKINTERFACE_STATUS
93
91
@@ -97,49 +95,49 @@ Test `NetworkInterface::attach()` and status indications.
97
95
98
96
**Preconditions:**
99
97
100
-
1. Network interface is initialized
101
-
2. Status callback is attached to network interface
102
-
3. Network interface is on blocking mode
98
+
1. Network interface is initialized.
99
+
2. Status callback is attached to the network interface.
100
+
3. Network interface is on blocking mode.
103
101
104
102
**Test steps:**
105
103
106
-
1. Connect interface
107
-
2. Check that interface indicates status NSAPI_STATUS_CONNECTING
108
-
3. Optional: check that interface indicates status NSAPI_STATUS_LOCAL_UP (whether this is indicated depends on network interface type)
109
-
4. Check that interface indicates status NSAPI_STATUS_GLOBAL_UP
110
-
5. Disconnect interface
111
-
6. Check that interface indicates status NSAPI_STATUS_DISCONNECTED
112
-
7. Repeat connect and disconnect steps 1 to 6 four times
104
+
1. Connect interface.
105
+
2. Check that interface indicates status `NSAPI_STATUS_CONNECTING`.
106
+
3. Optional: Check that interface indicates status `NSAPI_STATUS_LOCAL_UP` (whether this is indicated depends on network interface type).
107
+
4. Check that interface indicates status `NSAPI_STATUS_GLOBAL_UP`.
108
+
5. Disconnect interface.
109
+
6. Check that interface indicates status `NSAPI_STATUS_DISCONNECTED`.
110
+
7. Repeat connect and disconnect steps 1 to 6 four times.
113
111
114
112
**Expected result:**
115
113
116
-
Callback statuses are correct. `Connect()` and `disconnect()` calls return NSAPI_ERROR_OK. Note: network interface may indicate same status several times a row depending on network interface type. This will not fail the test.
114
+
Callback statuses are correct. `Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`. Note: The network interface may indicate the same status several times in a row, depending on the network interface type. This will not fail the test.
117
115
118
116
### NETWORKINTERFACE_STATUS_NONBLOCK
119
117
120
118
**Description:**
121
119
122
-
Test `NetworkInterface::attach()` and status indications on non-blocking mode.
120
+
Test `NetworkInterface::attach()` and status indications on nonblocking mode.
123
121
124
122
**Preconditions:**
125
123
126
-
1. Network interface is initialized
127
-
2. Status callback is attached to network interface
128
-
3. Network interface is on non-blocking mode
124
+
1. Network interface is initialized.
125
+
2. Status callback is attached to the network interface.
126
+
3. Network interface is on nonblocking mode.
129
127
130
128
**Test steps:**
131
129
132
-
1. Connect interface
133
-
2. Check that interface indicates status NSAPI_STATUS_CONNECTING
134
-
3. Optional: check that interface indicates status NSAPI_STATUS_LOCAL_UP (whether this is indicated depends on network interface type)
135
-
4. Check that interface indicates status NSAPI_STATUS_GLOBAL_UP
136
-
5. Disconnect interface
137
-
6. Check that interface indicates status NSAPI_STATUS_DISCONNECTED
138
-
7. Repeat connect and disconnect steps 1 to 6 four times
130
+
1. Connect interface.
131
+
2. Check that interface indicates status `NSAPI_STATUS_CONNECTING`.
132
+
3. Optional: Check that interface indicates status `NSAPI_STATUS_LOCAL_UP` (whether this is indicated depends on network interface type).
133
+
4. Check that interface indicates status `NSAPI_STATUS_GLOBAL_UP`.
134
+
5. Disconnect interface.
135
+
6. Check that interface indicates status `NSAPI_STATUS_DISCONNECTED`.
136
+
7. Repeat connect and disconnect steps 1 to 6 four times.
139
137
140
138
**Expected result:**
141
139
142
-
Callback statuses are correct. `Connect()` and `disconnect()` calls return NSAPI_ERROR_OK. Note: network interface may indicate same status several times a row depending on network interface type. This will not fail the test.
140
+
Callback statuses are correct. `Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`. Note: The network interface may indicate the same status several times in a row, depending on the network interface type. This will not fail the test.
143
141
144
142
### NETWORKINTERFACE_STATUS_GET
145
143
@@ -149,18 +147,18 @@ Test `NetworkInterface::get_connection_status()`.
149
147
150
148
**Preconditions:**
151
149
152
-
1. Network interface is initialized
153
-
2. Network interface is on blocking mode
150
+
1. Network interface is initialized.
151
+
2. Network interface is on blocking mode.
154
152
155
153
**Test steps:**
156
154
157
-
1. Check that `get_connection_status()` returns status NSAPI_STATUS_DISCONNECTED
158
-
2. Connect interface
159
-
3. Poll the `get_connection_status()` until it returns status NSAPI_STATUS_GLOBAL_UP
160
-
4. Disconnect interface
161
-
5. Check that `get_connection_status()` returns status NSAPI_STATUS_DISCONNECTED
162
-
6. Repeat connect and disconnect steps 2 to 5 four times
155
+
1. Check that `get_connection_status()` returns status `NSAPI_STATUS_DISCONNECTED`.
156
+
2. Connect interface.
157
+
3. Poll the `get_connection_status()` until it returns status `NSAPI_STATUS_GLOBAL_UP`.
158
+
4. Disconnect interface.
159
+
5. Check that `get_connection_status()` returns status `NSAPI_STATUS_DISCONNECTED`.
160
+
6. Repeat connect and disconnect steps 2 to 5 four times.
163
161
164
162
**Expected result:**
165
163
166
-
`Connect()` and `disconnect()` calls return NSAPI_ERROR_OK. Right status is returned by `get_connection_status()`.
164
+
`Connect()` and `disconnect()` calls return `NSAPI_ERROR_OK`. The right status is returned by `get_connection_status()`.
0 commit comments