static string _address = null;
static bool _flagNameChanged = false;
static bool _flagDiscovery = false;
+ static bool _flagDiscoveryStarted = false;
static bool _flagDiscoveryFinished = false;
static bool _isBluetoothSupported = false;
static bool _isBluetoothLeSupported = false;
if (!String.IsNullOrEmpty(e.DeviceFound.Address))
_flagDiscovery = true;
}
- if (e.DiscoveryState == BluetoothDeviceDiscoveryState.Finished)
+ if (e.DiscoveryState == BluetoothDeviceDiscoveryState.Started)
+ _flagDiscoveryStarted = true;
+ else if (e.DiscoveryState == BluetoothDeviceDiscoveryState.Finished)
_flagDiscoveryFinished = true;
}
/* TEST CODE */
await DiscoverySetup();
- Assert.IsTrue(_flagDiscovery, "Start Device discovery changed callback is not invoked");
+ Assert.IsTrue(_flagDiscoveryStarted, "Start Device discovery changed callback is not invoked");
}
catch (Exception ex)
{
/* TEST CODE */
await DiscoverySetup();
- Assert.IsTrue(_flagDiscovery, "Start Device discovery changed callback is not invoked");
+ Assert.IsTrue(_flagDiscoveryStarted, "Start Device discovery changed callback is not invoked");
}
catch (Exception ex)
{