[Test]
[Category("P1")]
+ [Description("Check whether Dispose works without throwing exception")]
+ [Property("SPEC", "Tizen.Network.Bluetooth.BluetoothGattServer.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyuk Lee, hyuk0512.lee@samsung.com")]
+ public void Dispose_CHECK_NO_EXCEPTION()
+ {
+ try
+ {
+ /* PRECONDITION
+ * 1. Enable Bluetooth
+ */
+ Assert.IsTrue(BluetoothAdapter.IsBluetoothEnabled, "PRECONDITION Failed: Bluetooth services should have beeen initialised");
+
+ /* TEST CODE */
+ BluetoothGattServer server = BluetoothGattServer.CreateServer();
+ Assert.IsInstanceOf<BluetoothGattServer>(server, "Should return BluetoothGattServer instance.");
+
+ server.Dispose();
+ }
+ catch (Exception ex)
+ {
+ if (ex is NotSupportedException)
+ {
+ Assert.IsTrue(_isBluetoothGattServerSupported == false, "Invalid NotSupportedException");
+ }
+ else
+ {
+ Assert.Fail("Throwing exception " + ex.ToString());
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check if RegisterGattService adds given service properly")]
[Property("SPEC", "Tizen.Network.Bluetooth.BluetoothGattServer.RegisterGattService M")]
[Property("SPEC_URL", "-")]