using System.Collections.Generic;
using System.Threading.Tasks;
using System;
-
+using Tizen.Applications.Exceptions;\r
+\r
namespace Tizen.Applications.Tests
{
private const string MyAppId = "org.tizen.SampleServiceApp.Tizen";
private const string MyAppId1 = "org.tizen.SampleServiceApp2.Tizen";
private const string MyUIAppId = "org.tizen.example.UIApp.Tizen";
+ private const string _unknownAppId = "org.example.unknown.test.app";
private bool _flag;
private bool _replyFlag = false;
await Task.Delay(5000);
Assert.IsTrue (_replyFlag, " The flag should be true");
}
+
+ [Test]
+ [Category("P2")]
+ [Description("Test : Send Launch Request - AppNotFoundException should be occurred")]
+ [Property("SPEC", "Tizen.Applications.AppControl.SendLaunchRequest M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ [Property("COVPARAM", "Tizen.Applications.AppControl")]
+ public void SendLaunchRequest_CHECK_APP_NOT_FOUND_EXCEPTION()
+ {\r
+\r
+ /* PRECONDITION
+ * Privilege: http://tizen.org/privilege/appmanager.launch
+ * */\r
+\r
+ /* TEST CODE */\r
+ var appControl = new AppControl();
+ appControl.Operation = AppControlOperations.Default;
+ appControl.ApplicationId = _unknownAppId;
+
+ try\r
+ {\r
+ AppControl.SendLaunchRequest(appControl);\r
+ Assert.Fail("AppNotFoundException should be occurred");\r
+ }
+ catch (AppNotFoundException)
+ {\r
+ Assert.Pass("AppNotFoundException occurs");\r
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Test : Send Launch Request - ArgumentNullException should be occurred")]
+ [Property("SPEC", "Tizen.Applications.AppControl.SendLaunchRequest M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ [Property("COVPARAM", "Tizen.Applications.AppControl")]
+ public void SendLaunchRequest_CHECK_ARGUNMENT_NULL_EXCEPTION()
+ {
+ try\r
+ {\r
+ AppControl.SendLaunchRequest(null);\r
+ Assert.Fail("ArgumentNullException should be occurred");\r
+ }
+ catch (ArgumentNullException)
+ {\r
+ Assert.Pass("ArgumentNullException occurs");\r
+ }
+ }
}
}