[SetUp]
public static void Init()
{
- Tizen.Log.Info(TAG, "Executing Init");
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
- Information.TryGetValue("http://tizen.org/feature/network.telephony", out _isTelephonySupported);
-
- /* Initialize Manager */
- _simList = Manager.Init();
- Assert.IsNotNull(_simList, "simList is Null");
- Assert.IsInstanceOf<IEnumerable<SlotHandle>>(_simList, "simList is Not of IEnumerable<SlotHandle> type");
- ICollection<SlotHandle> c = _simList as ICollection<SlotHandle>;
- Assert.IsTrue(c.Count != 0, "simList is Empty");
+ try
+ {
+ Tizen.Log.Info(TAG, "Executing Init");
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
+ Information.TryGetValue("http://tizen.org/feature/network.telephony", out _isTelephonySupported);
+
+ /* Initialize Manager */
+ _simList = Manager.Init();
+ Assert.IsNotNull(_simList, "simList is Null");
+ Assert.IsInstanceOf<IEnumerable<SlotHandle>>(_simList, "simList is Not of IEnumerable<SlotHandle> type");
+ ICollection<SlotHandle> c = _simList as ICollection<SlotHandle>;
+ Assert.IsTrue(c.Count != 0, "simList is Empty");
+ }
+ catch (NotSupportedException)
+ {
+ Tizen.Log.Info(TAG, "Failed Init() by NotSupportedException");
+
+ if (_isTelephonySupported == false)
+ Assert.Pass("Telephony feature is not supported");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.IsTrue(false, "Caught Exception" + e.ToString());
+ }
+
}
[TearDown]
Tizen.Log.Info(TAG, "Completed TC:NotificationType_GET_ENUM_ALL");
}
- catch (NotSupportedException)
- {
- Assert.IsTrue(_isTelephonySupported == false, "Invalid NotSupportedException");
- }
catch (Exception e)
{
Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
Tizen.Log.Info(TAG, "Completed TC:NotificationData_READ_ONLY");
}
- catch (NotSupportedException)
- {
- Assert.IsTrue(_isTelephonySupported == false, "Invalid NotSupportedException");
- }
catch (Exception e)
{
Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
[SetUp]
public static void Init()
{
- Tizen.Log.Info(TAG, "Executing Init");
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
- _notificationReceived = false;
- Information.TryGetValue("http://tizen.org/feature/network.telephony", out _isTelephonySupported);
-
- /* Initialize Manager */
- _simList = Manager.Init();
- Assert.IsNotNull(_simList, "simList is Null");
- Assert.IsInstanceOf<IEnumerable<SlotHandle>>(_simList, "simList is Not of IEnumerable<SlotHandle> type");
- ICollection<SlotHandle> c = _simList as ICollection<SlotHandle>;
- Assert.IsTrue(c.Count != 0, "simList is Empty");
+ try
+ {
+ Tizen.Log.Info(TAG, "Executing Init");
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
+ _notificationReceived = false;
+ Information.TryGetValue("http://tizen.org/feature/network.telephony", out _isTelephonySupported);
+
+ /* Initialize Manager */
+ _simList = Manager.Init();
+ Assert.IsNotNull(_simList, "simList is Null");
+ Assert.IsInstanceOf<IEnumerable<SlotHandle>>(_simList, "simList is Not of IEnumerable<SlotHandle> type");
+ ICollection<SlotHandle> c = _simList as ICollection<SlotHandle>;
+ Assert.IsTrue(c.Count != 0, "simList is Empty");
+ }
+ catch (NotSupportedException)
+ {
+ Tizen.Log.Info(TAG, "Failed Init() by NotSupportedException");
+
+ if (_isTelephonySupported == false)
+ Assert.Pass("Telephony feature is not supported");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.IsTrue(false, "Caught Exception" + e.ToString());
+ }
}
[TearDown]
Tizen.Log.Info(TAG, "Completed TC:SetNotificationId_Working");
TelephonyHelper.PrintLog(Type.DLogAndlogUtil, "Completed TC:SetNotificationId_Working");
}
- catch (NotSupportedException)
- {
- Assert.IsTrue(_isTelephonySupported == false, "Invalid NotSupportedException");
- }
catch (Exception e)
{
TelephonyHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
Tizen.Log.Info(TAG, "Completed TC:RemoveNotificationId_Working");
TelephonyHelper.PrintLog(Type.DLogAndlogUtil, "Completed TC:RemoveNotificationId_Working");
}
- catch (NotSupportedException)
- {
- Assert.IsTrue(_isTelephonySupported == false, "Invalid NotSupportedException");
- }
catch (Exception e)
{
TelephonyHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());