}
[Test]
- [Category("P3")]
- [Description("Get privilege display name with not defined privilege")]
+ [Category("P2")]
+ [Description("Get privilege display name with not defined privilege to check ArgumentException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDisplayName M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string")]
- public void GetDisplayName_NOT_DEFINED_RETURN_VALUE()
+ public void GetDisplayName_RETURN_ARGUMENT_EXCEPTION()
{
try
{
var ret = Privilege.GetDisplayName(apiVersion, notDefinedPrivilege);
- Assert.IsInstanceOf<string>(ret, "Display name should be string type.");
- Assert.IsNotNull(ret, "Display name should not be null.");
- Assert.IsTrue(ret.Length >= 0, "Length of display name should be greater than 0.");
+ Assert.Fail("Expects to throw ArgumentException exception when not defined privilege inputted, but exception not thrown");
}
catch (Exception e)
{
- Assert.Fail("Privilege.GetDisplayName: " + e.ToString());
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentException"), "GetDisplayName does not accept unknown privilege input.");
+
}
}
[Test]
- [Category("P3")]
- [Description("Get privilege display name with package type with not defined privilege")]
+ [Category("P2")]
+ [Description("Get privilege display name with package type with not defined privilege to check ArgumentException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDisplayName M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string, Tizen.Applications.PackageType")]
- public void GetDisplayName_PACKAGETYPE_NOT_DEFINED_RETURN_VALUE()
+ public void GetDisplayName_PACKAGETYPE_RETURN_ARGUMENT_EXCEPTION()
{
try
{
var ret = Privilege.GetDisplayName(apiVersion, notDefinedPrivilege, wgt);
- Assert.IsInstanceOf<string>(ret, "Display name should be string type.");
- Assert.IsNotNull(ret, "Display name should not be null.");
- Assert.IsTrue(ret.Length >= 0, "Length of display name should be greater than 0.");
+ Assert.Fail("Expects to throw ArgumentException exception when not defined privilege inputted, but exception not thrown");
}
catch (Exception e)
{
- Assert.Fail("Privilege.GetDisplayName: " + e.ToString());
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentException"), "GetDisplayName does not accept unknown privilege input.");
}
}
[Test]
[Category("P2")]
- [Description("Get privilege display name with null input parameter to check ArgumentException exception")]
+ [Description("Get privilege display name with null api-version input parameter to check ArgumentNullException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDisplayName M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string")]
- public void GetDisplayName_NULL_PARAM()
+ public void GetDisplayName_NULL_PARAM_API_VERSION()
{
try
{
var ret = Privilege.GetDisplayName(null, internetPrivilege);
Assert.Fail("Expects to throw ArgumentException exception when null inputted for version param, but exception not thrown");
+
}
catch (Exception e)
{
- Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDisplayName does not accept null input.");
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDisplayName does not accept null api-version input.");
}
}
[Test]
[Category("P2")]
- [Description("Get privilege display name with package type with null input parameter to check ArgumentException exception")]
+ [Description("Get privilege display name with null privilege input parameter to check ArgumentNullException exception")]
+ [Property("SPEC", "Tizen.Security.Privilege.GetDisplayName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
+ [Property("COVPARAM", "string, string")]
+ public void GetDisplayName_NULL_PARAM_PRIVILEGE()
+ {
+ try
+ {
+ var ret = Privilege.GetDisplayName(apiVersion, null);
+ Assert.Fail("Expects to throw ArgumentException exception when null inputted for privilege param, but exception not thrown");
+
+ }
+ catch (Exception e)
+ {
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDisplayName does not accept null privilege input.");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Get privilege display name with package type with null api-version input parameter to check ArgumentNullException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDisplayName M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string, Tizen.Applications.PackageType")]
- public void GetDisplayName_PACKAGETYPE_NULL_PARAM()
+ public void GetDisplayName_PACKAGETYPE_NULL_PARAM_API_VERSION()
{
try
{
}
catch (Exception e)
{
- Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDisplayName does not accept null input.");
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDisplayName does not accept null api-version input.");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Get privilege display name with package type with null privilege input parameter to check ArgumentNullException exception")]
+ [Property("SPEC", "Tizen.Security.Privilege.GetDisplayName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
+ [Property("COVPARAM", "string, string, Tizen.Applications.PackageType")]
+ public void GetDisplayName_PACKAGETYPE_NULL_PARAM_PRIVILEGE()
+ {
+ try
+ {
+ var ret = Privilege.GetDisplayName(apiVersion, null, tpk);
+ Assert.Fail("Expects to throw ArgumentException exception when null inputted for privilege param, but exception not thrown");
+ }
+ catch (Exception e)
+ {
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDisplayName does not accept null privilege input.");
}
}
}
[Test]
- [Category("P3")]
- [Description("Get privilege description with not defined privilege")]
+ [Category("P2")]
+ [Description("Get privilege description with not defined privilege to check ArgumentException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDescription M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string")]
- public void GetDescription_NOT_DEFINED_RETURN_VALUE()
+ public void GetDescription_RETURN_ARGUMENT_EXCEPTION()
{
try
{
var ret = Privilege.GetDescription(apiVersion, notDefinedPrivilege);
- Assert.IsInstanceOf<string>(ret, "Description should be string type.");
- Assert.IsNotNull(ret, "Description should not be null.");
- Assert.IsTrue(ret.Length >= 0, "Length of description should be greater than 0.");
+ Assert.Fail("Expects to throw ArgumentException exception when not defined privilege inputted, but exception not thrown");
}
catch (Exception e)
{
- Assert.Fail("Privilege.GetDescription: " + e.ToString());
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentException"), "GetDescription does not accept unknown privilege input.");
}
}
[Test]
- [Category("P3")]
- [Description("Get privilege description with package type with not defined privilege")]
+ [Category("P2")]
+ [Description("Get privilege description with package type with not defined privilege to check ArgumentException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDescription M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string, Tizen.Applications.PackageType")]
- public void GetDescription_PACKAGETYPE_NOT_DEFINED_RETURN_VALUE()
+ public void GetDescription_PACKAGETYPE_RETURN_ARGUMENT_EXCEPTION()
{
try
{
var ret = Privilege.GetDescription(apiVersion, notDefinedPrivilege, wgt);
- Assert.IsInstanceOf<string>(ret, "Description should be string type.");
- Assert.IsNotNull(ret, "Description should not be null.");
- Assert.IsTrue(ret.Length >= 0, "Length of description should be greater than 0.");
+ Assert.Fail("Expects to throw ArgumentException exception when not defined privilege inputted, but exception not thrown");
}
catch (Exception e)
{
- Assert.Fail("Privilege.GetDescription: " + e.ToString());
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentException"), "GetDescription does not accept unknown privilege input.");
}
}
[Test]
[Category("P2")]
- [Description("Get privilege description with null input parameter to check ArgumentException exception")]
+ [Description("Get privilege description with null api-version input parameter to check ArgumentNullException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDescription M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string")]
- public void GetDescription_NULL_PARAM()
+ public void GetDescription_NULL_PARAM_API_VERSION()
{
try
{
var ret = Privilege.GetDescription(null, internetPrivilege);
- Assert.Fail("Expects to throw ArgumentException exception when null inputted for version param, but exception not thrown");
+ Assert.Fail("Expects to throw ArgumentNullException exception when null inputted for version param, but exception not thrown");
+ }
+ catch (Exception e)
+ {
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDescription does not accept null api-version input.");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Get privilege description with null privilege input parameter to check ArgumentNullException exception")]
+ [Property("SPEC", "Tizen.Security.Privilege.GetDescription M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
+ [Property("COVPARAM", "string, string")]
+ public void GetDescription_NULL_PARAM_PRIVILEGE()
+ {
+ try
+ {
+ var ret = Privilege.GetDescription(apiVersion, null);
+ Assert.Fail("Expects to throw ArgumentNullException exception when null inputted for privilege param, but exception not thrown");
}
catch (Exception e)
{
[Test]
[Category("P2")]
- [Description("Get privilege description with package type with null input parameter to check ArgumentException exception")]
+ [Description("Get privilege description with package type with null api-version input parameter to check ArgumentNullException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetDescription M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
[Property("COVPARAM", "string, string, Tizen.Applications.PackageType")]
- public void GetDescription_PACKAGETYPE_NULL_PARAM()
+ public void GetDescription_PACKAGETYPE_NULL_PARAM_API_VERSION()
{
try
{
var ret = Privilege.GetDescription(null, internetPrivilege, tpk);
- Assert.Fail("Expects to throw ArgumentException exception when null inputted for version param, but exception not thrown");
+ Assert.Fail("Expects to throw ArgumentNullException exception when null inputted for version param, but exception not thrown");
}
catch (Exception e)
{
- Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDescription does not accept null input.");
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDescription does not accept null api-version input.");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Get privilege description with package type with null privilege input parameter to check ArgumentNullException exception")]
+ [Property("SPEC", "Tizen.Security.Privilege.GetDescription M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Yunjin Lee, yunjin-.lee@samsung.com")]
+ [Property("COVPARAM", "string, string, Tizen.Applications.PackageType")]
+ public void GetDescription_PACKAGETYPE_NULL_PARAM_PRIVILEGE()
+ {
+ try
+ {
+ var ret = Privilege.GetDescription(apiVersion, null, tpk);
+ Assert.Fail("Expects to throw ArgumentNullException exception when null inputted for privilege param, but exception not thrown");
+ }
+ catch (Exception e)
+ {
+ Assert.IsTrue(e.GetType().Name.Equals("ArgumentNullException"), "GetDescription does not accept null privilege input.");
}
}
[Test]
[Category("P2")]
- [Description("Get privacy display name with null input parameter to check ArgumentException exception")]
+ [Description("Get privacy display name with null input parameter to check ArgumentNullException exception")]
[Property("SPEC", "Tizen.Security.Privilege.GetPrivacyDisplayName M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
try
{
var ret = Privilege.GetPrivacyDisplayName(null);
- Assert.Fail("Expects to throw ArgumentException exception when null inputted for privilege param, but exception not thrown");
+ Assert.Fail("Expects to throw ArgumentNullException exception when null inputted for privilege param, but exception not thrown");
}
catch (NotSupportedException)
{