Skip to content

Commit ca08924

Browse files
authored
Add validations to 'CanToggleData' Test (#528)
1 parent 46b0cdf commit ca08924

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/integration/Android/Device/NetworkTests.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ public void SetUp()
2626
[OneTimeTearDown]
2727
public void TearDown()
2828
{
29-
_driver.Dispose();
29+
if (_driver != null)
30+
{
31+
_driver.Dispose();
32+
}
3033
}
3134

3235
[Test]
@@ -35,7 +38,11 @@ public void CanToggleDataTest()
3538
var androidDriver = (AndroidDriver) _driver;
3639

3740
androidDriver.ToggleData();
41+
ConnectionType currentConnectionType = androidDriver.ConnectionType;
42+
Assert.That(currentConnectionType, Is.EqualTo(ConnectionType.WifiOnly));
3843
androidDriver.ToggleData();
44+
currentConnectionType = androidDriver.ConnectionType;
45+
Assert.That(currentConnectionType, Is.EqualTo(ConnectionType.AllNetworkOn));
3946
}
4047

4148
[Test]

0 commit comments

Comments
 (0)