* TEST CODE
**/
Assert.AreEqual(ConnectionState.Deactivated, ConnectionManager.WiFiState, "get WiFi_State_deactived is fail");
-
- // POSTCONDITION
- await setUp();
}
catch (NotSupportedException)
{
{
Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
}
+ finally
+ {
+ // POSTCONDITION
+ await setUp();
+ }
}
[Test]
await Task.Delay(1500);
ConnectionManager.ConnectionTypeChanged -= EventHandlerConnectionTypeChanged;
Assert.IsTrue(_flag, "Event ChangeType is fail");
- // POSTCONDITION
- await setUp();
}
catch (NotSupportedException)
{
{
Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
}
+ finally
+ {
+ // POSTCONDITION
+ await setUp();
+ }
}
public void EventHandlerConnectionTypeChanged(object sender, ConnectionTypeEventArgs e)
}
finally
{
+ await setUp();
if (_wifiAP != null)
{
_wifiAP.Dispose();
Log.Info(Globals.LogTag, "GetProxy=" + ConnectionManager.GetProxy(AddressFamily.IPv4));
await networkSetup.ForgetCurrentAP();
ConnectionManager.ProxyAddressChanged -= EventHandlerProxyAddressChanged;
- // POSTCONDITION
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ // POSTCONDITION
+ await setUp();
+
if (_wifiAP != null)
{
_wifiAP.Dispose();
Log.Info(Globals.LogTag, "ConnectionType=" + ConnectionManager.CurrentConnection.Type.ToString());
Assert.AreEqual(ConnectionState.Connected.ToString(), ConnectionManager.CurrentConnection.State.ToString(), "CurrentConnection_STATE is fail");
Assert.AreEqual(ConnectionType.WiFi.ToString(), ConnectionManager.CurrentConnection.Type.ToString(), "CurrentConnection_STATE is fail");
- // POSTCONDITION
- await setUp();
}
catch (NotSupportedException)
{
{
Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
}
+ finally
+ {
+ // POSTCONDITION
+ await setUp();
+ }
}
[Test]
Assert.AreEqual(new IPAddress(BitConverter.GetBytes(preIP)).ToString(), addInfor.IP.ToString(), "set IP is fail");
Assert.AreEqual(IPConfigType.Static.ToString(), addInfor.IPConfigType.ToString(), "set IpConfigType is fail");
- /* POSTCONDITION */
- await networkSetup.ForgetCurrentAP();
- await setUp();
Log.Info(Globals.LogTag, "Finished");
}
catch (NotSupportedException)
}
finally
{
+ /* POSTCONDITION */
+ await networkSetup.ForgetCurrentAP();
+ await setUp();
+
if (_connectionProfile != null)
{
_connectionProfile.Dispose();
Assert.IsTrue(found, "Can't find IPv6 ");
Assert.AreEqual(IPConfigType.Static.ToString(), addInfor.IPConfigType.ToString(), "set IpConfigType is fail");
- /* POSTCONDITION */
- await networkSetup.ForgetCurrentAP();
- await setUp();
Log.Info(Globals.LogTag, "Finished");
}
catch (NotSupportedException)
}
finally
{
+ /* POSTCONDITION */
+ await networkSetup.ForgetCurrentAP();
+ await setUp();
+
if (_connectionProfile != null)
{
_connectionProfile.Dispose();
_connectionProfile.ProxyType = ProxyType.Manual;
Assert.AreEqual(ProxyType.Manual.ToString(), _connectionProfile.ProxyType.ToString(), "Set ProxyType is fail");
-
- /* POSTCONDITION */
- await networkSetup.ForgetCurrentAP();
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ /* POSTCONDITION */
+ await networkSetup.ForgetCurrentAP();
+ await setUp();
+
if (_connectionProfile != null)
{
_connectionProfile.Dispose();
var proxy = "192.168.1.100";
_connectionProfile.ProxyAddress = proxy;
Assert.AreEqual(proxy, _connectionProfile.ProxyAddress.ToString(), "Set proxyAddress is fail");
-
- /* POSTCONDITION */
- await networkSetup.ForgetCurrentAP();
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ /* POSTCONDITION */
+ await networkSetup.ForgetCurrentAP();
+ await setUp();
+
if (_connectionProfile != null)
{
_connectionProfile.Dispose();
Log.Info(Globals.LogTag, "_flag=" + _flag);
Assert.IsTrue(_flag, "Profile State don't change");
_connectionProfile.ProfileStateChanged -= EventHandlerProfileStateChanged;
- // POSTCONDITION
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ // POSTCONDITION
+ await setUp();
+
if (_connectionProfile != null)
{
_connectionProfile.Dispose();
p.Dispose();
}
Assert.AreEqual(0, _numTask);
- // POSTCONDITION
- if (isWiFiSupported && !WiFiManager.IsActive)
- await setUp();
}
catch (NotSupportedException)
{
{
Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
}
+ finally
+ {
+ // POSTCONDITION
+ if (isWiFiSupported && !WiFiManager.IsActive)
+ await setUp();
+ }
}
[Test]
}
Assert.IsTrue(flag, "RemoveProfile is fail");
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ await setUp();
if (_wifiAP != null)
{
_wifiAP.Dispose();
}
finally
{
+ await setUp();
+
if (_profile != null)
{
_profile.Dispose();
}
finally
{
+ await setUp();
+
if (_currCP != null)
{
_currCP.Dispose();
await Task.Delay(1500);
Assert.AreEqual(ConnectionState.Disconnected.ToString(), ConnectionManager.WiFiState.ToString(), "DisconnectProfileAsync is fail");
Log.Info(Globals.LogTag, "DisconnectProfileAsync_DISCONNECT_AP finish");
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ await setUp();
if (_profile != null)
{
_profile.Dispose();
await Task.Delay(1500);
Assert.IsTrue(_flag, "Profile State don't change");
_connectionProfile.ProfileStateChanged -= EventHandlerProfileStateChanged;
- // POSTCONDITION
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ // POSTCONDITION
+ await setUp();
+
if (_connectionProfile != null)
{
_connectionProfile.Dispose();
Log.Info(Globals.LogTag, "ConnectionType_GET ConnectionTypeChanged WiFi Disconnected");
Assert.IsTrue(_flag, "ConnectionType is not changed");
ConnectionManager.ConnectionTypeChanged -= ConnectionTypeChangedCB;
- // POSTCONDITION
- await setUp();
}
}
catch (NotSupportedException)
{
Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
}
+ finally
+ {
+ // POSTCONDITION
+ await setUp();
+ }
}
public void ConnectionTypeChangedCB(object sender, ConnectionTypeEventArgs e)
* POSTCONDITION
* */
_connectionProfile.ProfileStateChanged -= EventHandlerProfileStateChangedCB;
- // POSTCONDITION
- await setUp();
}
catch (NotSupportedException)
{
}
finally
{
+ // POSTCONDITION
+ await setUp();
+
if (_connectionProfile != null)
{
_connectionProfile.Dispose();
{
Assert.IsTrue(isWiFiSupported == false, "Invalid NotSupportedException");
}
- catch (ArgumentNullException ex)
+ catch (ArgumentNullException)
{
Assert.IsTrue(true, "Argument is null");
}