[Property("SPEC", "Tizen.Applications.Alarm.WeekFlag A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRE")]
- [Property("AUTHOR", "Jiwoong Im, jiwoong.im@samsung.com")]
- public void WeekFlag_RETURN_ENUM()
+ [Property("AUTHOR", "Inkyun Kil, inkyun.kil@samsung.com")]
+ public void WeekFlag_SET_GET()
{
Tizen.Applications.AppControl appControl = new Tizen.Applications.AppControl();
var flag = AlarmWeekFlag.AllDays;
_alarm = AlarmManager.CreateAlarm(DateTime.Now.AddSeconds(10), AlarmWeekFlag.AllDays, appControl);
Assert.IsNotNull(_alarm);
Assert.AreEqual(flag, _alarm.WeekFlag, "Propety \"WeekFlag\": the set value and the get value should be equal");
+
+ var newFlag = AlarmWeekFlag.Monday;
+ _alarm.WeekFlag = newFlag;
+ Assert.AreNotEqual(flag, _alarm.WeekFlag, "Property \"WeekFlag\" : If the WeekFlag is updated, the flag should be not equal to previous flag");
}
[Test]
[Property("SPEC", "Tizen.Applications.Alarm.ScheduledDate A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Jiwoong Im, jiwoong.im@samsung.com")]
- public void ScheduledDate_READ_ONLY()
+ [Property("AUTHOR", "Inkyun Kil, inkyun.kil@samsung.com")]
+
+ public void ScheduledDate_SET_GET()
{
Tizen.Applications.AppControl appControl = new Tizen.Applications.AppControl();
var now = DateTime.Now.AddSeconds(10);
_alarm = AlarmManager.CreateAlarm(date, AlarmWeekFlag.AllDays, appControl);
Assert.IsNotNull(_alarm);
Assert.AreEqual(date, _alarm.ScheduledDate, "Propety \"ScheduledDate\": the set value and the get value should be equal");
+
+ var newDate = new DateTime(now.Year + 10, now.Month, now.Day, now.Hour, now.Minute, now.Second);
+ _alarm.ScheduledDate = newDate;
+ Assert.AreNotEqual(date.Year, _alarm.ScheduledDate.Year, "Property \"ScheduledDate\" : If the scheduledDate is updated, the date should be not equal to previous date");
}
[Test]
[Property("SPEC", "Tizen.Applications.Alarm.Period A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "Jiwoong Im, jiwoong.im@samsung.com")]
- public void Period_READ_ONLY()
+ [Property("AUTHOR", "Inkyun Kil, inkyun.kil@samsung.com")]
+ public void Period_SET_GET()
{
Tizen.Applications.AppControl appControl = new Tizen.Applications.AppControl();
int period = 10;
_alarm = AlarmManager.CreateAlarm(100, period, appControl);
Assert.IsNotNull(_alarm);
Assert.Greater(_alarm.Period, 600, "Propety \"Period\": The minimum value which is calculated by OS is 600sec");
+
+ int previousPeriod = _alarm.Period;
+ _alarm.Period = 6000;
+ Assert.AreNotEqual(previousPeriod, _alarm.Period, "Property \"Period\" : If the period is updated, the period should be not equal to previous period");
}
[Test]