assert_equals(calendarItem.alarms[0].before.unit, duration.unit,
"calendarItem.alarms[0].before should be updated.");
- duration = new tizen.TimeDuration(1, "HOURS");
- calendarItem.alarms[0] = new tizen.CalendarAlarm(duration, "SOUND");
- assert_equals(calendarItem.alarms.length, 1,
- "calendarItem.attendees should be updated.");
- assert_equals(calendarItem.alarms[0].method, "SOUND",
- "calendarItem.alarms[0].method should be updated.");
- assert_equals(calendarItem.alarms[0].before.length, duration.length,
- "calendarItem.alarms[0].before should be updated.");
- assert_equals(calendarItem.alarms[0].before.unit, duration.unit,
- "calendarItem.alarms[0].before should be updated.");
-
calendarItem.alarms = null;
assert_not_equals(calendarItem.alarms, null,
"calendarItem.alarms should not accept null as value.");
assert_equals(calendarRecurrenceRule.exceptions.length, 0,
"calendarRecurrenceRule.exceptions should be empty by default.");
- calendarRecurrenceRule.exceptions[0] = exce;
- assert_equals(calendarRecurrenceRule.exceptions.length, 1,
- "calendarRecurrenceRule.exceptions should be updated.");
- assert_true(calendarRecurrenceRule.exceptions[0] instanceof tizen.TZDate,
- "calendarRecurrenceRule.exceptions attribute should be type of TZDate");
- assert_true(calendarRecurrenceRule.exceptions[0].equalsTo(exce), "dates should be equal");
-
- exce = new tizen.TZDate(2013, 11, 13, 12, 13, 0, 0);
calendarRecurrenceRule.exceptions = [exce];
assert_equals(calendarRecurrenceRule.exceptions.length, 1,
"calendarRecurrenceRule.exceptions should be updated.");