[Applications][TCSACR-228][Add new testcases] 83/202483/1
authorilho <ilho159.kim@samsung.com>
Fri, 29 Mar 2019 00:44:08 +0000 (09:44 +0900)
committerilho <ilho159.kim@samsung.com>
Fri, 29 Mar 2019 05:24:45 +0000 (14:24 +0900)
Added:
 - Id_GET()
 - Type_GET()
 - Version_GET()
 - ApiVersion_GET()
 - Description_GET()
 - Label_GET()
 - Author_GET()
 - Icon_GET()

Change-Id: I5168a8d6253af35a4b87bdf17f30bef0ffb8d53a
Signed-off-by: ilho <ilho159.kim@samsung.com>
tct-suite-vs/Tizen.Packagemanager.Tests/res/pkgarchivetest.tpk [new file with mode: 0644]
tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackageArchive.cs [new file with mode: 0644]

diff --git a/tct-suite-vs/Tizen.Packagemanager.Tests/res/pkgarchivetest.tpk b/tct-suite-vs/Tizen.Packagemanager.Tests/res/pkgarchivetest.tpk
new file mode 100644 (file)
index 0000000..104fc08
Binary files /dev/null and b/tct-suite-vs/Tizen.Packagemanager.Tests/res/pkgarchivetest.tpk differ
diff --git a/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackageArchive.cs b/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackageArchive.cs
new file mode 100644 (file)
index 0000000..86b4a10
--- /dev/null
@@ -0,0 +1,137 @@
+// Copyright 2019 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+
+namespace Tizen.Applications.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Applications.PackageArchive test class")]
+    public class PackageArchiveTests
+    {
+        PackageArchive _pkgArchive;
+        private string _archiveTestPkg = "/home/owner/share/res/pkgarchivetest.tpk";
+        private string _id = "pkgarchivetest";
+        private string _type = "tpk";
+        private string _version = "1.0.0";
+        private string _apiVersion = "5.0";
+        private string _description = "PackageArchive test";
+        private string _label = "pkgarchivetest";
+        private string _author = "test author";
+        private int _iconSize = 57662;
+
+        [SetUp]
+        public void Init()
+        {
+            _pkgArchive = PackageManager.GetPackageArchive(_archiveTestPkg);
+        }
+
+        [TearDown]
+        public void Destroy()
+        {
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property Id of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.Id A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void Id_GET()
+        {
+            Assert.AreEqual(_id, _pkgArchive.Id, "Id of " + _archiveTestPkg + " is not correct");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property Type of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.Type A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void Type_GET()
+        {
+            Assert.AreEqual(_type, _pkgArchive.Type, "Type of " + _archiveTestPkg + " is not correct");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property Version of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.Version A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void Version_GET()
+        {
+            Assert.AreEqual(_version, _pkgArchive.Version, "Version of " + _archiveTestPkg + " is not correct");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property ApiVersion of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.ApiVersion A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void ApiVersion_GET()
+        {
+            Assert.AreEqual(_apiVersion, _pkgArchive.ApiVersion, "ApiVersion of " + _archiveTestPkg + " is not correct");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property Description of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.Description A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void Description_GET()
+        {
+            Assert.AreEqual(_description, _pkgArchive.Description, "Description of " + _archiveTestPkg + " is not correct");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property Label of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.Label A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void Label_GET()
+        {
+            Assert.AreEqual(_label, _pkgArchive.Label, "Label of " + _archiveTestPkg + " is not correct");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property Author of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.Author A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void Author_GET()
+        {
+            Assert.AreEqual(_author, _pkgArchive.Author, "Author of " + _archiveTestPkg + " is not correct");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test property Icon of PackageArchive.")]
+        [Property("SPEC", "Tizen.Applications.PackageArchive.Icon A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Ilho Kim, ilho159.kim@samsung.com")]
+        public void Icon_GET()
+        {
+            Assert.AreEqual(_iconSize, _pkgArchive.Icon.Length, "Icon size of " + _archiveTestPkg + " is not correct");
+        }
+    }
+
+}