Assert.IsFalse(_flag, "_flag should be false before checking");
ConnectionManager.IPAddressChanged += Ipv4AddressChangedCallBack;
- await Task.Delay(5000);
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "Ipv4AddressChanged Event subscribed");
await networkSetup.ForgetCurrentAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
await setUp();
Log.Info(Globals.LogTag, "Network is connected");
- await Task.Delay(3000);
+ await Task.Delay(1500);
Assert.IsTrue(_flag, "Ipv4Address is not changed");
ConnectionManager.IPAddressChanged -= Ipv4AddressChangedCallBack;
await setUp();
ConnectionManager.IPAddressChanged += Ipv6AddressChangedCallBack;
- await Task.Delay(5000);
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "Ipv6Address_GET Ipv6AddressChanged Event subscribed");
await networkSetup.ForgetCurrentAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
await setUp();
Log.Info(Globals.LogTag, "Network is connected");
- await Task.Delay(3000);
+ await Task.Delay(1500);
Assert.IsTrue(_flag, "Ipv6Address is not changed");
/**
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
+ await Task.Delay(1500);
}
[Test]
*/
await setUp();
- await Task.Delay(3000);
/**
* TEST CODE
Log.Info(Globals.LogTag, "ConnectionItem_State_GET start");
await setUp();
- await Task.Delay(3000);
/**
* TEST CODE
{
_nameWiFi = networkParameter.wnPRIVATE;
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
/*setup using for connecting to a PUBLIC AP*/
_nameWiFi = networkParameter.wnPUBLIC;
Log.Info(Globals.LogTag, "Try to connect to " + networkParameter.wnPUBLIC);
await networkSetup.ConnectWiFi(networkParameter.wnPUBLIC, networkParameter.wType.wPublic, null);
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
public static async Task tearDown()
{
_nameWiFi = null;
await networkSetup.DeactivateWiFi();
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
[Test]
if (isWiFiSupported && WiFiManager.IsActive)
await tearDown();
await Task.Delay(5000);
+
Log.Info(Globals.LogTag, "CellularState_CONNECTED_STATE WiFi is disconnected");
/**
* TEST CODE
}
Assert.AreEqual(CellularState.Connected, ConnectionManager.CellularState, "get Cellular_Connected_State is fail");
+
// POSTCONDITION
await setUp();
}
* */
Log.Info(Globals.LogTag, "WiFiState_CONNECTED_STATE start");
await setUp();
+
/**
* TEST CODE
**/
_wifiAP = WiFiManager.GetConnectedAP();
Assert.IsNotNull(_wifiAP, "No WiFi connection");
await _wifiAP.ForgetAPAsync();
- await Task.Delay(3000);
+ await Task.Delay(1500);
+
/**
* TEST CODE
**/
Log.Info(Globals.LogTag, "WiFiState: " + ConnectionManager.WiFiState.ToString());
Assert.AreEqual(ConnectionState.Disconnected, ConnectionManager.WiFiState, "get WiFi_State_disconnected is fail");
- await Task.Delay(3000);
+
await setUp();
}
catch (NotSupportedException)
Log.Info(Globals.LogTag, "WiFiState_DEACTIVATED_STATE start");
if (WiFiManager.IsActive)
await tearDown();
+
/**
* TEST CODE
**/
Assert.AreEqual(ConnectionState.Deactivated, ConnectionManager.WiFiState, "get WiFi_State_deactived is fail");
+
// POSTCONDITION
await setUp();
}
* create a connection to WiFi public/private
* */
await setUp();
+
/**
* TEST CODE
* */
* TEST CODE
* */
ConnectionManager.ConnectionTypeChanged += EventHandlerConnectionTypeChanged;
- networkSetup.ForgetCurrentAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
+ await networkSetup.ForgetCurrentAP();
+ await Task.Delay(1500);
ConnectionManager.ConnectionTypeChanged -= EventHandlerConnectionTypeChanged;
Assert.IsTrue(_flag, "Event ChangeType is fail");
// POSTCONDITION
* */
Log.Info(Globals.LogTag, "IpAddressChanged_EVENT start");
ConnectionManager.IPAddressChanged += EventHandlerIpAddressChanged;
+ await Task.Delay(1500);
await setUp();
/**
* TEST CODE
* */
_wifiAP = WiFiManager.GetConnectedAP();
Assert.IsNotNull(_wifiAP, "No WiFi connection");
- await _wifiAP.DisconnectAsync();
- await Task.Delay(5000);
+ await _wifiAP.ForgetAPAsync();
+ await Task.Delay(1500);
await setUp();
ConnectionManager.IPAddressChanged -= EventHandlerIpAddressChanged;
Assert.IsTrue(_flag, "Event ChangeType is fail");
Assert.IsNotNull(_wifiAP, "No WiFi connection");
_wifiAP.NetworkInformation.ProxyType = WiFiProxyType.Manual;
_wifiAP.NetworkInformation.ProxyAddress = "192.168.1.6:8080";
- await Task.Delay(3000);
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "GetMacAddress=" + ConnectionManager.GetMacAddress(ConnectionType.WiFi));
Log.Info(Globals.LogTag, "GetIpAddress=" + ConnectionManager.GetIPAddress(AddressFamily.IPv4));
Log.Info(Globals.LogTag, "GetProxy=" + ConnectionManager.GetProxy(AddressFamily.IPv4));
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
ConnectionManager.ProxyAddressChanged -= EventHandlerProxyAddressChanged;
// POSTCONDITION
await setUp();
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
[Test]
* turn on a Public WiFi
* */
await setUp();
- /*TEST CODE */
+
+ /* TEST CODE */
_connectionProfile = ConnectionProfileManager.GetCurrentProfile();
Assert.IsNotNull(_connectionProfile);
Assert.IsNotNull((string)_connectionProfile.Id, "ID is null");
* turn on a Public WiFi
* */
await setUp();
- /*TEST CODE */
+
+ /* TEST CODE */
_connectionProfile = ConnectionProfileManager.GetCurrentProfile();
Assert.IsNotNull(_connectionProfile);
Assert.IsNotNull((string)_connectionProfile.InterfaceName, "InterfaceName is null");
* turn on a Public WiFi
* */
await setUp();
- /*TEST CODE */
+
+ /* TEST CODE */
_connectionProfile = ConnectionProfileManager.GetCurrentProfile();
Assert.IsNotNull(_connectionProfile);
Assert.AreEqual(ProfileState.Connected.ToString(), _connectionProfile.GetState(AddressFamily.IPv4).ToString(), "get state is fail");
* turn on a Public WiFi
* */
await setUp();
- /*TEST CODE */
+
+ /* TEST CODE */
_connectionProfile = ConnectionProfileManager.GetCurrentProfile();
Assert.IsNotNull(_connectionProfile);
_connectionProfile.Refresh();
* turn on a Public WiFi
* */
await setUp();
- /*TEST CODE */
+
+ /* TEST CODE */
_connectionProfile = ConnectionProfileManager.GetCurrentProfile();
Assert.IsNotNull(_connectionProfile);
Assert.AreEqual((string)networkParameter.wnPRIVATE, (string)_connectionProfile.Name, "get name is fail");
* turn on a Public WiFi
* */
await setUp();
- /*TEST CODE */
+
+ /* TEST CODE */
_connectionProfile = ConnectionProfileManager.GetCurrentProfile();
Assert.IsNotNull(_connectionProfile);
Assert.AreEqual(ConnectionProfileType.WiFi, _connectionProfile.Type, "get Type is fail");
Assert.AreEqual(IPConfigType.Static.ToString(), addInfor.IPConfigType.ToString(), "set IpConfigType is fail");
/* POSTCONDITION */
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
await setUp();
Log.Info(Globals.LogTag, "Finished");
}
Assert.AreEqual(IPConfigType.Static.ToString(), addInfor.IPConfigType.ToString(), "set IpConfigType is fail");
/* POSTCONDITION */
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
await setUp();
Log.Info(Globals.LogTag, "Finished");
}
Assert.AreEqual(ProxyType.Manual.ToString(), _connectionProfile.ProxyType.ToString(), "Set ProxyType is fail");
/* POSTCONDITION */
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
await setUp();
}
catch (NotSupportedException)
Assert.AreEqual(proxy, _connectionProfile.ProxyAddress.ToString(), "Set proxyAddress is fail");
/* POSTCONDITION */
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
await setUp();
}
catch (NotSupportedException)
Assert.IsNotNull(_connectionProfile, "No Profile Found");
_connectionProfile.ProfileStateChanged += EventHandlerProfileStateChanged;
- await Task.Delay(3000);
+ await Task.Delay(1500);
await networkSetup.ForgetCurrentAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "_flag=" + _flag);
Assert.IsTrue(_flag, "Profile State don't change");
_connectionProfile.ProfileStateChanged -= EventHandlerProfileStateChanged;
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
public static async Task tearDown()
{
await networkSetup.DeactivateWiFi();
- await Task.Delay(2000);
+ await Task.Delay(1500);
}
[Test]
Assert.IsNotNull(_profile, "Profile is Null");
await ConnectionProfileManager.DisconnectProfileAsync(_profile);
Assert.AreEqual(ConnectionState.Disconnected.ToString(), ConnectionManager.WiFiState.ToString(), "DisconnectProfileAsync is fail");
- await Task.Delay(3000);
+ await Task.Delay(1500);
await ConnectionProfileManager.ConnectProfileAsync(_profile);
Assert.AreEqual(ConnectionState.Connected.ToString(), ConnectionManager.WiFiState.ToString(), "ConnectProfileAsync is fail");
Log.Info(Globals.LogTag, "ConnectProfileAsync_CONNECT_AGAIN_TO_SAME_POINT Finish");
}
/*Disconnect AP*/
await ConnectionProfileManager.DisconnectProfileAsync(_currCP);
+ await Task.Delay(1500);
Assert.AreEqual(ConnectionState.Disconnected.ToString(), ConnectionManager.WiFiState.ToString(), "DisconnectProfileAsync is fail");
Log.Info(Globals.LogTag, "wifi is disconnected");
- await Task.Delay(3000);
/* TEST CODE */
/* connect to a WANTED AP */
Log.Info(Globals.LogTag, "DisconnectProfileAsync_DISCONNECT_AP start");
if (WiFiManager.GetConnectedAP() == null)
{
- await Task.Delay(5000);
+ await Task.Delay(1500);
}
await setUp();
/* TEST CODE */
}
}
await ConnectionProfileManager.DisconnectProfileAsync(_profile);
+ await Task.Delay(1500);
Assert.AreEqual(ConnectionState.Disconnected.ToString(), ConnectionManager.WiFiState.ToString(), "DisconnectProfileAsync is fail");
- await Task.Delay(3000);
Log.Info(Globals.LogTag, "DisconnectProfileAsync_DISCONNECT_AP finish");
await setUp();
}
Assert.IsNotNull(_connectionProfile, "No Profile Found");
_connectionProfile.ProfileStateChanged += EventHandlerProfileStateChanged;
- await Task.Delay(3000);
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "Event subscripted");
await networkSetup.ForgetCurrentAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "_flag=" + _flag);
Assert.IsTrue(_flag, "Profile State don't change");
_connectionProfile.ProfileStateChanged -= EventHandlerProfileStateChanged;
* TEST CODE
*/
WiFiManager.ConnectionStateChanged += EventHandlerConnectionStateChangedCBState;
- await Task.Delay(3000);
- networkSetup.ForgetCurrentAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
+ await networkSetup.ForgetCurrentAP();
+ await Task.Delay(1500);
Assert.IsTrue(_flag, "Flag should be true after checking");
/**
*/
await setUp();
_wifiAP1 = WiFiManager.GetConnectedAP();
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
Assert.IsFalse(_flag, "Flag should be fail before checking");
/*
* Then, connect to WiFi private2, changed WiFiApjk
*/
WiFiManager.ConnectionStateChanged += EventHandlerConnectionStateChangedCBAp;
- await Task.Delay(3000);
+ await Task.Delay(1500);
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE1, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
_wifiAP2 = WiFiManager.GetConnectedAP();
Assert.IsTrue(_flag, "Flag should be true after checking");
WiFiManager.ConnectionStateChanged -= EventHandlerConnectionStateChangedCBAp;
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
+ await Task.Delay(1500);
}
[Test]
/** TEST CODE */
ConnectionManager.ConnectionTypeChanged += ConnectionTypeChangedCB;
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "ConnectionType_GET ConnectionTypeChanged Event subsribed");
await setUp();
- await Task.Delay(3000);
Log.Info(Globals.LogTag, "ConnectionType_GET ConnectionTypeChanged WiFi Connected");
- networkSetup.ForgetCurrentAP();
- await Task.Delay(2000);
+ await networkSetup.ForgetCurrentAP();
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "ConnectionType_GET ConnectionTypeChanged WiFi Disconnected");
Assert.IsTrue(_flag, "ConnectionType is not changed");
ConnectionManager.ConnectionTypeChanged -= ConnectionTypeChangedCB;
* TEST CODE
*/
WiFiManager.DeviceStateChanged += EventHandlerDeviceStateChangedCB;
- await Task.Delay(3000);
+ await Task.Delay(1500);
await tearDown();
- await Task.Delay(3000);
+ await Task.Delay(1500);
await setUp();
- await Task.Delay(3000);
+ await Task.Delay(1500);
Assert.IsTrue(_flag, "Flag should be true after checking");
WiFiManager.DeviceStateChanged -= EventHandlerDeviceStateChangedCB;
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
[Test]
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
private static void EventHandlerProfileStateChangedCB(object sender, EventArgs e)
*/
Assert.IsNotNull(_connectionProfile, "No Profile Found");
_connectionProfile.ProfileStateChanged += EventHandlerProfileStateChangedCB;
- await Task.Delay(3000);
- networkSetup.ForgetCurrentAP();
- Log.Info(Globals.LogTag, "ConnectionProfile3=" + _connectionProfile.GetState(AddressFamily.IPv4).ToString());
- await Task.Delay(3000);
+ await Task.Delay(1500);
+ await networkSetup.ForgetCurrentAP();
+ await Task.Delay(1500);
+ Log.Info(Globals.LogTag, "ConnectionProfile3=" + _connectionProfile.GetState(AddressFamily.IPv4).ToString());
Log.Info(Globals.LogTag, "ConnectionProfile5=" + _connectionProfile.GetState(AddressFamily.IPv4).ToString());
Assert.IsTrue(_flag, "Flag should be true before check");
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
+ await Task.Delay(1500);
}
private static void EventHandlerRssiLevelChangedCB(object sender, EventArgs e)
* TEST CODE
*/
WiFiManager.RssiLevelChanged += EventHandlerRssiLevelChangedCB;
- await Task.Delay(3000);
- networkSetup.ForgetCurrentAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
+ await networkSetup.ForgetCurrentAP();
+ await Task.Delay(1500);
await setUp();
- await Task.Delay(3000);
Assert.IsTrue(_flag, "Flag should be true after checking");
WiFiManager.RssiLevelChanged -= EventHandlerRssiLevelChangedCB;
await WiFiManager.ActivateAsync();
}
WiFiManager.ScanStateChanged += EventHandlerScanStateChangedCB;
+ await Task.Delay(1500);
await WiFiManager.ScanAsync();
WiFiManager.ScanStateChanged -= EventHandlerScanStateChangedCB;
/** TEST CODE */
await WiFiManager.ActivateAsync();
- await Task.Delay(5000);
+ await WiFiManager.ScanAsync();
var list = WiFiManager.GetFoundAPs();
Log.Info(Globals.LogTag, "Got found aps");
foreach (var item in list)
Assert.IsNotNull(_wifiAP, "Can't create a WiFi ap");
Log.Info(Globals.LogTag, "Try to Connect to " + _wifiAP.NetworkInformation.Essid.ToString());
await _wifiAP.ConnectAsync();
- await Task.Delay(5000);
_wifiAP2 = WiFiManager.GetConnectedAP();
Assert.IsNotNull(_wifiAP2, "No WiFi connection");
Assert.AreEqual(_wifiAP.NetworkInformation.Essid.ToString(), _wifiAP2.NetworkInformation.Essid.ToString(), "Can't connect to a WiFi");
_wifiAP = WiFiManager.GetConnectedAP();
Assert.IsNotNull(_wifiAP, "Failed to connect WiFi");
await _wifiAP.DisconnectAsync();
- await Task.Delay(5000);
+ await Task.Delay(1500);
Assert.AreEqual(WiFiConnectionState.Disconnected.ToString(), WiFiManager.ConnectionState.ToString(), "WiFi is not disconnected");
Log.Info(Globals.LogTag, "Successfully done");
/**
_wifiAP = WiFiManager.GetConnectedAP();
Assert.IsNotNull(_wifiAP, "No WiFi connection");
_wifiAP.ForgetAP();
- await Task.Delay(3000);
+ await Task.Delay(1500);
Assert.AreEqual((int)(WiFiConnectionState.Disconnected), (int)(WiFiManager.ConnectionState), "ConnectionState of removed AP should be is DISCONNECT");
Log.Info(Globals.LogTag, "Successfully done");
_wifiAP = WiFiManager.GetConnectedAP();
Assert.IsNotNull(_wifiAP, "No WiFi connection");
await _wifiAP.ForgetAPAsync();
- await Task.Delay(2000);
+ await Task.Delay(1500);
Assert.AreEqual(WiFiConnectionState.Disconnected.ToString(), WiFiManager.ConnectionState.ToString(), "ConnectionState of removed AP should be is DISCONNECT");
Log.Info(Globals.LogTag, "Successfully done");
Assert.IsNotNull(_wifiAP, "No WiFi connection");
_wifiAP.Dispose();
await _wifiAP.ForgetAPAsync();
- await Task.Delay(2000);
Assert.IsTrue(false, "ObjectDisposedException should be thrown");
}
catch (NotSupportedException)
Assert.IsNotNull(_wifiAP, "No WiFi connection");
await tearDown();
- await Task.Delay(2000);
await _wifiAP.ForgetAPAsync();
- await Task.Delay(2000);
Assert.IsTrue(false, "InvalidOperationException should be thrown");
}
catch (NotSupportedException)
ipv4Setting.IP = IPAddress.Parse(ip);
_wifiAP.Update();
- await Task.Delay(2000);
+ await Task.Delay(1500);
Assert.AreEqual(ip.ToString(), ipv4Setting.IP.ToString(), "Ip of Ipv4Setting get should be same set");
Log.Info(Globals.LogTag, "Successfully done");
/*
* POSTCONDITION
*/
- ipv4Setting.IPConfigType = IPConfigType.Static;
- ipv4Setting.IP = IPAddress.Parse(oldIP);
- _wifiAP.Update();
- await Task.Delay(2000);
+ await networkSetup.ForgetCurrentAP();
+ await setUp();
}
catch (NotSupportedException)
{
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
_wants = networkParameter.wnPRIVATE;
}
{
setUp();
_wiFiEap.SetClientCertFile(_clientCertFile);
- ;
Assert.AreEqual(_clientCertFile, _wiFiEap.GetClientCertFile(), "ClientCertFile doesn't get properly");
}
catch (NotSupportedException)
public static async Task setUp()
{
await networkSetup.ConnectWiFi(_wants, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
_wifiAP = WiFiManager.GetConnectedAP();
Assert.IsNotNull(_wifiAP, "No WiFi connection");
_wiFiConfig = new WiFiConfiguration(_wifiAP.NetworkInformation.Essid, networkParameter.wPASS, WiFiSecurityType.Eap);
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
public static async Task tearDown()
{
await networkSetup.DeactivateWiFi();
- await Task.Delay(2000);
+ await Task.Delay(1500);
}
public static void EventHandlerRssi(object sender, RssiLevelChangedEventArgs Rssi)
/** TEST CODE */
await WiFiManager.ActivateAsync();
- await Task.Delay(3000);
Assert.IsTrue(WiFiManager.IsActive, "WiFi is off");
Log.Info(Globals.LogTag, "Successfully done");
/** TEST CODE */
await WiFiManager.ActivateWithPickerAsync();
- await Task.Delay(3000);
Assert.IsTrue(WiFiManager.IsActive, "WiFi is off");
Log.Info(Globals.LogTag, "Successfully done");
WiFiAP ap = WiFiManager.GetConnectedAP();
await networkSetup.ForgetCurrentAP();
await WiFiManager.DeactivateAsync();
- await Task.Delay(3000);
Assert.IsFalse(WiFiManager.IsActive, "WiFi doesn't turn off");
Log.Info(Globals.LogTag, "Successfully done");
/** TEST CODE **/
var count = 0;
await WiFiManager.ActivateAsync();
- await Task.Delay(5000);
await WiFiManager.ScanAsync();
var listApp = WiFiManager.GetFoundAPs();
foreach (var item in listApp)
if (!WiFiManager.IsActive)
{
await WiFiManager.ActivateAsync();
- await Task.Delay(3000);
}
await WiFiManager.ScanSpecificAPAsync(networkParameter.wnPRIVATE);
var listApp = WiFiManager.GetFoundSpecificAPs();
- await Task.Delay(3000);
+ await Task.Delay(1500);
foreach (var item in listApp)
count++;
Assert.Greater(count, 0, "GetFoundSpecificAps is fail");
try
{
WiFiManager.DeviceStateChanged += EventHandlerDevice;
- await Task.Delay(3000);
+ await Task.Delay(1500);
if (!WiFiManager.IsActive)
{
await WiFiManager.ActivateAsync();
- await Task.Delay(3000);
- await networkSetup.ForgetCurrentAP();
- await WiFiManager.DeactivateAsync();
- await Task.Delay(3000);
+ await Task.Delay(1500);
+ await tearDown();
+ await Task.Delay(1500);
Assert.True(_flag, "Event DeviceStateChanged hasn't been call.");
}
else
{
await networkSetup.ForgetCurrentAP();
await WiFiManager.DeactivateAsync();
- await Task.Delay(3000);
+ await Task.Delay(1500);
await WiFiManager.ActivateAsync();
- await Task.Delay(3000);
+ await Task.Delay(1500);
Assert.True(_flag, "Event DeviceStateChanged hasn't been call.");
}
WiFiManager.DeviceStateChanged -= EventHandlerDevice;
* TEST CODE
*/
WiFiManager.RssiLevelChanged += EventHandlerRssi;
+ await Task.Delay(1500);
if (WiFiManager.IsActive)
{
Log.Info(Globals.LogTag, "WiFi is activated");
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
}
await setUp();
Assert.True(_flag, "Event RssiLevelChanged hasn't been call.");
/** TEST CODE */
Assert.AreEqual((int)(WiFiConnectionState.Connected), (int)(WiFiManager.ConnectionState), "ConnectionState didn't return connected after connect to WiFiAp");
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
Assert.AreEqual((int)(WiFiConnectionState.Disconnected), (int)(WiFiManager.ConnectionState), "ConnectionState didn't return disconnected after discnnect");
Log.Info(Globals.LogTag, "Successfully done");
* PRECONDITION
*/
if (WiFiManager.IsActive)
- networkSetup.ForgetCurrentAP();
+ await networkSetup.ForgetCurrentAP();
Assert.IsFalse(_flag, "Flag should be fail before checking");
/*
_flag = true;
};
WiFiManager.ConnectionStateChanged += connectionStateChanged;
- await Task.Delay(3000);
+ await Task.Delay(1500);
await setUp();
- await Task.Delay(3000);
+ await Task.Delay(1500);
Assert.IsTrue(_flag, "Flag should be true after checking");
WiFiManager.ConnectionStateChanged -= connectionStateChanged;
};
WiFiManager.BackgroundScanFinished += backgroundScanFinished;
- await Task.Delay(3000);
+ await Task.Delay(1500);
await setUp();
WiFiAP ap = WiFiManager.GetConnectedAP();
ap.ForgetAP();
if (!WiFiManager.IsActive)
{
await WiFiManager.ActivateAsync();
- await Task.Delay(3000);
}
WiFiManager.ScanStateChanged += EventHandlerScanState;
+ await Task.Delay(1500);
await WiFiManager.ScanAsync();
+ await Task.Delay(1500);
WiFiManager.ScanStateChanged -= EventHandlerScanState;
Assert.IsTrue(_flag, "ScanState is not changed.");
Log.Info(Globals.LogTag, "Successfully done");
public static async Task setUp()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(3000);
}
[Test]
Log.Info(Globals.LogTag, "Successfully done");
await _wifiAP.ForgetAPAsync();
- await Task.Delay(3000);
await setUp();
Log.Info(Globals.LogTag, "Finished");
}
Log.Info(Globals.LogTag, "Successfully done");
await _wifiAP.ForgetAPAsync();
- await Task.Delay(3000);
await setUp();
Log.Info(Globals.LogTag, "Finished");
}
}
}
- public static async Task delay_test_rssid()
- {
- await Task.Delay(5000);
- }
-
[Test]
[Category("P1")]
[Description("Test Rssi property")]
public static async Task setup()
{
await networkSetup.ConnectWiFi(networkParameter.wnPRIVATE, networkParameter.wType.wPrivate, networkParameter.wPASS);
- await Task.Delay(5000);
}
[Test]
* - Creat an SecurityInformation.
*/
await setup();
+ await Task.Delay(1500);
Log.Info(Globals.LogTag, "WiFiConnectionState=" + WiFiConnectionState.Connected.ToString());
Log.Info(Globals.LogTag, "WiFiConnectionState=" + WiFiManager.ConnectionState.ToString());
if (!WiFiManager.IsActive)
{
await WiFiManager.ActivateAsync();
- await Task.Delay(3000);
+ await Task.Delay(1500);
}
Tizen.Log.Info(Globals.LogTag, "WiFi is Activated");
}