--- /dev/null
+// 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");
+ }
+ }
+
+}