From fecd7014d74ce3fbc68924f0e31a03bda967ae73 Mon Sep 17 00:00:00 2001 From: ilho Date: Thu, 28 Mar 2019 11:00:14 +0900 Subject: [PATCH] [Applications][TCSACR-229][Add new testcases] Added: - MainApplication_READ_ONLY() Change-Id: Ic7734ca3079811acd5622ec6a26ca67aa2782ac7 Signed-off-by: ilho --- .../testcase/TSPackage.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackage.cs b/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackage.cs index f80bcaa81..49663a837 100755 --- a/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackage.cs +++ b/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackage.cs @@ -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(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(mainapplication, "MainApplication should return ApplicationInfo"); + Assert.AreEqual(mainapplication.ApplicationId, MainAppId, "Main Application ID should be same " + MainAppId); + } } } -- 2.34.1