[Applications][TCSACR-229][Add new testcases] 12/202412/2
authorilho <ilho159.kim@samsung.com>
Thu, 28 Mar 2019 02:00:14 +0000 (11:00 +0900)
committerilho <ilho159.kim@samsung.com>
Tue, 2 Apr 2019 01:04:48 +0000 (10:04 +0900)
Added:
 - MainApplication_READ_ONLY()

Change-Id: Ic7734ca3079811acd5622ec6a26ca67aa2782ac7
Signed-off-by: ilho <ilho159.kim@samsung.com>
tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackage.cs

index f80bcaa81e17e9342405ba409063512d79844b20..49663a8378a8961df32443d203633b0b4cb2a54d 100755 (executable)
@@ -19,6 +19,7 @@ namespace Tizen.Applications.Tests
     {
         private Package TpkPackage = null;
         private Package WgtPackage = null;
+        private const string MainAppId = "tpkpkgtest";
 
         [TestFixtureSetUp]
         public void Init()
@@ -486,5 +487,23 @@ namespace Tizen.Applications.Tests
             Assert.IsInstanceOf<int>(TpkPackage.InstalledTime, "Package InstalledTime should be of type int");
             Assert.IsTrue(TpkPackage.InstalledTime > 0 , "InstalledTime must be bigger than 0");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Checks if MainApplication property return correct value")]
+        [Property("SPEC", "Tizen.Applications.Package.MainApplication A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Kim Ilho, ilho159.kim@samsung.com")]
+        public void MainApplication_READ_ONLY()
+        {
+            // PRECONDITION
+            Assert.IsNotNull(TpkPackage, "Precondition failed: testPackage should not be null");
+
+            // TEST CODE
+            var mainapplication = TpkPackage.MainApplication;
+            Assert.IsInstanceOf<ApplicationInfo>(mainapplication, "MainApplication should return ApplicationInfo");
+            Assert.AreEqual(mainapplication.ApplicationId, MainAppId, "Main Application ID should be same " + MainAppId);
+        }
     }
 }