[Description("Test if get for Device.Display:State property is working properly")]
[Property("SPEC", "Tizen.System.Display.State A")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Praveen Kumar Gattu, gattu.p@samsung.com")]
- public static void State_PROPERTY_READ_ONLY()
+ public static void State_PROPERTY_READ_WRITE()
{
if (isSupport == 1)
{
+ Display.State = DisplayState.Normal;
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "State_READ Value:" + Display.State);
- Assert.IsInstanceOf<DisplayState>(Display.State, "Dsiaply state should be valid");
+ Assert.IsTrue(Display.State == DisplayState.Normal, "Set/Get State value should be the same");
}
else
{
}
}
+ [Test]
+ [Category("P1")]
+ [Description("Test if get for Tizen.System.Power:RequestLock method is working properly")]
+ [Property("SPEC", "Tizen.System.Power.RequestLock M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ [Property("AUTHOR", "Pureum Jung, pr.jung@samsung.com")]
+ public static void RequestLock_CHECK_RESULT()
+ {
+ /* TEST CODE */
+ try
+ {
+ foreach (PowerLock type in Enum.GetValues(typeof(PowerLock)))
+ {
+ Power.RequestLock(type, 2000);
+ }
+ }
+ catch (Exception e)
+ {
+ Assert.IsTrue(false, "failed to request cpu lock. " + e.Message);
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check ArgumentException for RequestLock with non-existing lock type")]
+ [Property("SPEC", "Tizen.System.Power.RequestLock M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Pureum Jung, pr.jung@samsung.com")]
+ public static void RequestLock_ARGUMENT_EXCEPTION()
+ {
+ /* TEST CODE */
+ try
+ {
+ Power.RequestLock((PowerLock)100, 2000);
+ }
+ catch (Exception e)
+ {
+ Assert.IsInstanceOf<ArgumentException>(e, "ArgumentException should be thrown for invalid lock type" + e.GetType());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test if get for Tizen.System.Power:ReleaseLock method is working properly")]
+ [Property("SPEC", "Tizen.System.Power.ReleaseLock M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ [Property("AUTHOR", "Pureum Jung, pr.jung@samsung.com")]
+ public static void ReleaseLock_CHECK_RESULT()
+ {
+ /* TEST CODE */
+ try
+ {
+ foreach (PowerLock type in Enum.GetValues(typeof(PowerLock)))
+ {
+ Power.ReleaseLock(type);
+ }
+ }
+ catch (Exception e)
+ {
+ Assert.IsTrue(false, "failed to release cpu lock. " + e.Message);
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check ArgumentException for ReleaseLock with non-existing lock type")]
+ [Property("SPEC", "Tizen.System.Power.ReleaseLock M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Pureum Jung, pr.jung@samsung.com")]
+ public static void ReleaseLock_ARGUMENT_EXCEPTION()
+ {
+ /* TEST CODE */
+ try
+ {
+ Power.ReleaseLock((PowerLock)100);
+ }
+ catch (Exception e)
+ {
+ Assert.IsInstanceOf<ArgumentException>(e, "ArgumentException should be thrown for invalid lock type" + e.GetType());
+ }
+ }
+
}
}