[Feedback][Non-ACR] Add nagative testcases 71/215671/2
authorYunmi Ha <yunmi.ha@samsung.com>
Mon, 14 Oct 2019 06:14:06 +0000 (15:14 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Tue, 15 Oct 2019 08:03:14 +0000 (17:03 +0900)
Change-Id: Ie732b1b85f80e9a32c2367c74478ee1ce16f7b41
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
tct-suite-vs/Tizen.Feedback.Tests/testcase/TSFeedback.cs

index 760228e..5764589 100755 (executable)
@@ -224,6 +224,29 @@ namespace Tizen.System.Tests {
         }
 
         [Test]
+        [Category("P2")]
+        [Description("Check ArgumentException for Play API with non-existent pattern.")]
+        [Property("SPEC", "Tizen.System.Feedback.Play M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MEX")]
+        [Property("AUTHOR", "Yunmi Ha, yunmi.ha@samsung.com")]
+        public void Play_CHECK_ARGUMENT_EXCEPTION_ALL_TYPE()
+        {
+            Feedback feedback = new Feedback();
+
+            LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Play TEST");
+            try
+            {
+                feedback.Play(FeedbackType.All, "NonExistentPattern");
+                Assert.Fail("Did not throw any exception with FeedbackType.ALL param.");
+            }
+            catch (Exception e)
+            {
+                Assert.IsInstanceOf<ArgumentException>(e, "ArgumentException should be thrown for invalid item select. " + e.GetType());
+            }
+        }
+
+        [Test]
         [Category("P1")]
         [Description("Test if Stop method working properly")]
         [Property("SPEC", "Tizen.System.Feedback.Stop M")]