[Sticker][Non-ACR] Fix nullreferenceexception issue 88/274788/3
authorInHong Han <inhong1.han@samsung.com>
Tue, 10 May 2022 04:02:20 +0000 (13:02 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 10 May 2022 04:02:20 +0000 (13:02 +0900)
Change-Id: I111521e56b56db3ed17dc1b866b3da5a32794a3b

tct-suite-vs/Tizen.Sticker.Tests/testcase/TSDeletedEventArgs.cs
tct-suite-vs/Tizen.Sticker.Tests/testcase/TSGroupImage.cs
tct-suite-vs/Tizen.Sticker.Tests/testcase/TSInsertedEventArgs.cs
tct-suite-vs/Tizen.Sticker.Tests/testcase/TSStickerConsumer.cs
tct-suite-vs/Tizen.Sticker.Tests/testcase/TSStickerData.cs
tct-suite-vs/Tizen.Sticker.Tests/testcase/TSStickerProvider.cs
tct-suite-vs/Tizen.Sticker.Tests/testcase/TSUpdatedEventArgs.cs

index 92242b3..0e95383 100644 (file)
@@ -60,10 +60,15 @@ namespace Tizen.Uix.Sticker.Tests
         [TearDown]\r
         public void Destroy()\r
         {\r
-            StickerProvider.Deinitialize();\r
-            StickerConsumer.Deleted -= DeleteEventOccurred;\r
-            StickerConsumer.Deinitialize();\r
             LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");\r
+\r
+            if (_featureSupported)\r
+            {\r
+                StickerProvider.Deinitialize();\r
+                StickerConsumer.Deleted -= DeleteEventOccurred;\r
+                StickerConsumer.Deinitialize();\r
+            }\r
+\r
             GC.Collect();\r
         }\r
 \r
@@ -109,10 +114,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
     }\r
index fa805db..6cf28de 100644 (file)
@@ -26,20 +26,13 @@ namespace Tizen.Uix.Sticker.Tests
     public class GroupImageTests\r
     {\r
         private const string LogTag = "Sticker.Tests";\r
-        private static bool _featureSupported = false;\r
-        private static string _stickerFeature = "http://tizen.org/feature/ui_service.sticker";\r
         private static GroupImage _groupImage;\r
 \r
         [SetUp]\r
         public void Init()\r
         {\r
             LogUtils.Write(LogUtils.DEBUG, LogTag, "Preconditions for each TEST");\r
-            System.Information.TryGetValue(_stickerFeature, out _featureSupported);\r
-\r
-            if (_featureSupported)\r
-            {\r
-                _groupImage = new GroupImage("test", UriType.WebResource, "www.samsung.com");\r
-            }\r
+            _groupImage = new GroupImage("test", UriType.WebResource, "www.samsung.com");\r
         }\r
 \r
         [TearDown]\r
@@ -58,39 +51,10 @@ namespace Tizen.Uix.Sticker.Tests
         [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
         public void GroupImage_CONSTR()\r
         {\r
-            try\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:GroupImage_CONSTR");\r
-                GroupImage groupImage = new GroupImage("test", UriType.WebResource, "www.samsung.com");\r
-                Assert.IsInstanceOf<GroupImage>(groupImage, "Should return StickerData instance.");\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:GroupImage_CONSTR");\r
-            }\r
-            catch (Exception e)\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
-                else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
-            }\r
-        }\r
-\r
-        [Test]\r
-        [Category("P2")]\r
-        [Description("Check working of GroupImage constructor for exception")]\r
-        [Property("SPEC", "Tizen.Uix.Sticker.GroupImage.GroupImage C")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "CONSTX")]\r
-        [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
-        public void GroupImage_CONSTX()\r
-        {\r
-\r
-            LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:GroupImage_CONSTX");\r
-            if (!_featureSupported)\r
-            {\r
-                Assert.Throws<NotSupportedException>(() => { GroupImage groupImage = new GroupImage("test", UriType.WebResource, "www.samsung.com"); });\r
-            }\r
-            LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:GroupImage_CONSTX");\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:GroupImage_CONSTR");\r
+            GroupImage groupImage = new GroupImage("test", UriType.WebResource, "www.samsung.com");\r
+            Assert.IsInstanceOf<GroupImage>(groupImage, "Should return StickerData instance.");\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:GroupImage_CONSTR");\r
         }\r
 \r
         [Test]\r
@@ -102,21 +66,10 @@ namespace Tizen.Uix.Sticker.Tests
         [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
         public void GroupName_READ_ONLY()\r
         {\r
-            try\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:GroupName_READ_ONLY");\r
-                string groupName = _groupImage.GroupName;\r
-                Assert.IsNotNull(groupName);\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:GroupName_READ_ONLY");\r
-            }\r
-            catch (Exception e)\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
-                else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
-            }\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:GroupName_READ_ONLY");\r
+            string groupName = _groupImage.GroupName;\r
+            Assert.IsNotNull(groupName);\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:GroupName_READ_ONLY");\r
         }\r
 \r
         [Test]\r
@@ -128,21 +81,10 @@ namespace Tizen.Uix.Sticker.Tests
         [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
         public void UriType_READ_ONLY()\r
         {\r
-            try\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:UriType_READ_ONLY");\r
-                UriType uriType = _groupImage.UriType;\r
-                Assert.IsTrue(uriType == UriType.WebResource);\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:UriType_READ_ONLY");\r
-            }\r
-            catch (Exception e)\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
-                else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
-            }\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:UriType_READ_ONLY");\r
+            UriType uriType = _groupImage.UriType;\r
+            Assert.IsTrue(uriType == UriType.WebResource);\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:UriType_READ_ONLY");\r
         }\r
 \r
         [Test]\r
@@ -154,21 +96,10 @@ namespace Tizen.Uix.Sticker.Tests
         [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
         public void Uri_READ_ONLY()\r
         {\r
-            try\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:Uri_READ_ONLY");\r
-                string uri = _groupImage.Uri;\r
-                Assert.IsNotNull(uri);\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:Uri_READ_ONLY");\r
-            }\r
-            catch (Exception e)\r
-            {\r
-                LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
-                else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
-            }\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:Uri_READ_ONLY");\r
+            string uri = _groupImage.Uri;\r
+            Assert.IsNotNull(uri);\r
+            LogUtils.Write(LogUtils.INFO, LogTag, "Completed TC:Uri_READ_ONLY");\r
         }\r
 \r
         [Test]\r
index 54cd083..6d6dfbd 100644 (file)
@@ -59,11 +59,16 @@ namespace Tizen.Uix.Sticker.Tests
         [TearDown]\r
         public void Destroy()\r
         {\r
-            StickerProvider.DeleteData(_testData);\r
-            StickerProvider.Deinitialize();\r
-            StickerConsumer.Inserted -= InsertEventOccurred;\r
-            StickerConsumer.Deinitialize();\r
             LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");\r
+\r
+            if (_featureSupported)\r
+            {\r
+                StickerProvider.DeleteData(_testData);\r
+                StickerProvider.Deinitialize();\r
+                StickerConsumer.Inserted -= InsertEventOccurred;\r
+                StickerConsumer.Deinitialize();\r
+            }\r
+\r
             GC.Collect();\r
         }\r
 \r
@@ -109,10 +114,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
     }\r
index a1a7a4f..2cedea1 100644 (file)
@@ -107,9 +107,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -133,9 +133,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -176,9 +176,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -204,9 +204,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -230,7 +230,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -240,7 +240,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -267,9 +267,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -293,7 +293,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -303,7 +303,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -330,9 +330,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -356,7 +356,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -366,7 +366,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -393,9 +393,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -419,7 +419,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -429,7 +429,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -456,9 +456,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -482,7 +482,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -492,7 +492,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -519,9 +519,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -547,9 +547,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -573,7 +573,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -583,7 +583,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -610,9 +610,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -638,9 +638,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -665,7 +665,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -675,7 +675,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -703,9 +703,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -729,7 +729,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -739,7 +739,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -788,9 +788,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -838,9 +838,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -890,9 +890,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -921,9 +921,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
     }\r
index 442d656..27f8111 100644 (file)
@@ -78,9 +78,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -120,10 +120,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -147,7 +147,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -156,7 +156,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -180,10 +180,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -207,7 +207,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -216,7 +216,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -240,10 +240,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -267,7 +267,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -276,7 +276,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -299,10 +299,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -323,9 +323,9 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
+                if (!_featureSupported)\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -334,7 +334,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -357,10 +357,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -381,9 +381,9 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
+                if (!_featureSupported)\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -392,7 +392,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -415,10 +415,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -439,9 +439,9 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
+                if (!_featureSupported)\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -450,7 +450,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -474,10 +474,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -501,7 +501,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -510,7 +510,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -534,10 +534,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -561,7 +561,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -570,7 +570,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -593,10 +593,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -618,15 +618,13 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
-\r
-\r
         [Test]\r
         [Category("P1")]\r
         [Description("Check working of StickerData Thumbnail property for no exception")]\r
@@ -646,10 +644,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -673,7 +671,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -682,7 +680,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -706,10 +704,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -731,10 +729,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -767,9 +765,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -793,7 +791,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -802,7 +800,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -826,10 +824,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -851,10 +849,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -878,7 +876,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -887,7 +885,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -909,10 +907,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -936,9 +934,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
     }\r
index f6230be..1785c56 100644 (file)
@@ -81,9 +81,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -107,9 +107,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -150,9 +150,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -179,9 +179,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -207,7 +207,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -217,7 +217,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -232,10 +232,10 @@ namespace Tizen.Uix.Sticker.Tests
         [Property("COVPARAM", "Tizen.Uix.Sticker.StickerData")]\r
         public void InsertData_InvalidOperationException()\r
         {\r
-            StickerProvider.Initialize();\r
             try\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:InsertData_InvalidOperationException");\r
+                StickerProvider.Initialize();\r
                 StickerData stickerData = new StickerData();\r
                 stickerData.SetUri(UriType.WebResource, "www.StickerProviderTests.com/emoji/smile");\r
                 stickerData.AddKeyword("smile");\r
@@ -252,7 +252,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -263,7 +263,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -291,9 +291,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -318,7 +318,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -328,7 +328,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -356,9 +356,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -383,7 +383,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -393,7 +393,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -407,10 +407,10 @@ namespace Tizen.Uix.Sticker.Tests
         [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
         public void UpdateData_InvalidOperationException()\r
         {\r
-            StickerProvider.Initialize();\r
             try\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:UpdateData_InvalidOperationException");\r
+                StickerProvider.Initialize();\r
                 StickerProvider.InsertData(_stickerData);\r
                 StickerProvider.UpdateData(_stickerData);\r
             }\r
@@ -419,7 +419,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -430,7 +430,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -458,9 +458,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -485,7 +485,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -495,7 +495,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -523,9 +523,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -550,7 +550,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -560,7 +560,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -589,9 +589,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -619,9 +619,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -645,7 +645,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -655,7 +655,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -684,9 +684,9 @@ namespace Tizen.Uix.Sticker.Tests
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
 \r
@@ -710,7 +710,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is ArgumentException)\r
                 {\r
@@ -720,7 +720,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
@@ -734,10 +734,10 @@ namespace Tizen.Uix.Sticker.Tests
         [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
         public void SetGroupImage_InvalidOperationException()\r
         {\r
-            StickerProvider.Initialize();\r
             try\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Executing TC:SetGroupImage_InvalidOperationException");\r
+                StickerProvider.Initialize();\r
                 StickerProvider.InsertData(_stickerData);\r
                 GroupImage groupImage = new GroupImage("tizen", UriType.LocalPath, "/res/invalid.png");\r
                 StickerProvider.SetGroupImage(groupImage);\r
@@ -747,7 +747,7 @@ namespace Tizen.Uix.Sticker.Tests
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
                 if ((!_featureSupported) && (e is NotSupportedException))\r
                 {\r
-                    Assert.IsTrue(true);\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 }\r
                 else if (e is InvalidOperationException)\r
                 {\r
@@ -758,7 +758,7 @@ namespace Tizen.Uix.Sticker.Tests
                 }\r
                 else\r
                 {\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
                 }\r
             }\r
         }\r
index 71dbbf1..6609922 100644 (file)
@@ -60,11 +60,16 @@ namespace Tizen.Uix.Sticker.Tests
         [TearDown]\r
         public void Destroy()\r
         {\r
-            StickerProvider.DeleteData(_testData);\r
-            StickerProvider.Deinitialize();\r
-            StickerConsumer.Updated -= UpdateEventOccurred;\r
-            StickerConsumer.Deinitialize();\r
             LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");\r
+\r
+            if (_featureSupported)\r
+            {\r
+                StickerProvider.DeleteData(_testData);\r
+                StickerProvider.Deinitialize();\r
+                StickerConsumer.Updated -= UpdateEventOccurred;\r
+                StickerConsumer.Deinitialize();\r
+            }\r
+\r
             GC.Collect();\r
         }\r
 \r
@@ -111,10 +116,10 @@ namespace Tizen.Uix.Sticker.Tests
             catch (Exception e)\r
             {\r
                 LogUtils.Write(LogUtils.INFO, LogTag, "Caught Exception" + e.ToString());\r
-                if ((!_featureSupported) && (e is NotSupportedException))\r
-                    Assert.IsTrue(true);\r
+                if (!_featureSupported)\r
+                    Assert.Pass("Sticker feature is not supported");\r
                 else\r
-                    Assert.IsTrue(false, "Caught Exception" + e.ToString());\r
+                    Assert.Fail("Caught Exception" + e.ToString());\r
             }\r
         }\r
     }\r