bool isBluetoothGattClientSupported = false;
BluetoothGattClient client = null;
bool isConnected = false;
+ BluetoothLeDevice leDevice = null;
[SetUp]
public void Init()
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][ConnectAsync_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
}
client = BluetoothGattClient.CreateClient(PreconditionUtils.GetBleAddress());
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][ConnectAsync_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+/*
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }*/
await client.ConnectAsync(false);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][DisconnectAsync_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
};
client.ConnectionStateChanged += OnConnectionStateChanged;
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
await ManualTest.WaitForConfirm();
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][RemoteAddress_PROPERTY_READ_ONLY] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][GetService_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][GetServices_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][ReadValueAsync_Characteristic_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][ReadValueAsync_Descriptor_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][WriteValueAsync_Characteristic_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][WriteValueAsync_Descriptor_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
Assert.IsInstanceOf<BluetoothGattClient>(client, "[TestCase][DestroyClient_RETURN_VALUE] Failed");
Assert.IsNotNull(client, "Precondition failed: client instance should not be null");
+ if (leDevice == null)
+ {
+ leDevice = await BluetoothSetup.LeScanSetup();
+ Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null");
+ }
+
await client.ConnectAsync(true);
isConnected = true;
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task AddressType_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("AddressType_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task AdvertsingDataInformation_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("AdvertsingDataInformation_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task Appearance_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("Appearance_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task DeviceName_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("DeviceName_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task ManufacturerData_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("ManufacturerData_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task RemoteAddress_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("RemoteAddress_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task Rssi_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("Rssi_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task ScanDataInformation_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("ScanDataInformation_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task ServiceSolictationUuid_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("ServiceSolictationUuid_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task ServiceUuid_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("ServiceUuid_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task TxPowerLevel_PROPERTY_READ_ONLY()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("TxPowerLevel_PROPERTY_READ_ONLY");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task GetServiceDataList_RETURN_LIST()
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("GetServiceDataList_RETURN_LIST");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Postcondition(1, "NA")]
public async Task PacketType_PROPERTY_READ_WRITE()
leDevice.PacketType = BluetoothLePacketType.BluetoothLeAdvertisingPacket;
PacketType = leDevice.PacketType;
Assert.AreEqual(BluetoothLePacketType.BluetoothLeAdvertisingPacket, PacketType);
- }
+ }
catch (NotSupportedException)
{
if (isBluetoothLeSupported == false)
catch (TypeInitializationException e)
{
if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
- {
+ {
BluetoothHelper.DisplayLabel("PacketType_PROPERTY_READ_WRITE");
await ManualTest.WaitForConfirm();
}
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")]
[Precondition(1, "Bluetooth should be turned on.")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button.")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "If TC fails, turn off and turn on Bluetooth. Try again.")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")]
[Precondition(1, "Bluetooth should be turned on.")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button.")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "If TC fails, turn off and turn on Bluetooth. Try again.")]
[Property("CRITERIA", "EVL")]
[Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")]
[Precondition(1, "Bluetooth should be turned on.")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button.")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "If TC fails, turn off and turn on Bluetooth. Try again.")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "NA")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "NA")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "NA")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "NA")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "NA")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "NA")]
[Property("COVPARAM", "Tizen.Network.Bluetooth.BluetoothLePacketType")]
[Property("AUTHOR", "Shikha, shikha.ta@samsung.com")]
[Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")]
- [Precondition(2, "Run GATT Server test case on another device")]
+ [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")]
[Step(1, "Tap the Run button")]
[Step(2, "TC should pass automatically.")]
[Postcondition(1, "NA")]