Skip to content

Commit

Permalink
Add validations to 'CanToggleData' Test (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dor-bl authored Oct 26, 2022
1 parent 46b0cdf commit ca08924
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/integration/Android/Device/NetworkTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public void SetUp()
[OneTimeTearDown]
public void TearDown()
{
_driver.Dispose();
if (_driver != null)
{
_driver.Dispose();
}
}

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

androidDriver.ToggleData();
ConnectionType currentConnectionType = androidDriver.ConnectionType;
Assert.That(currentConnectionType, Is.EqualTo(ConnectionType.WifiOnly));
androidDriver.ToggleData();
currentConnectionType = androidDriver.ConnectionType;
Assert.That(currentConnectionType, Is.EqualTo(ConnectionType.AllNetworkOn));
}

[Test]
Expand Down

0 comments on commit ca08924

Please sign in to comment.