[UTC][alarm][ACR-792][add notification alarm tc]
authorJiwoong Im <jiwoong.im@samsung.com>
Mon, 7 Nov 2016 03:25:34 +0000 (12:25 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Mon, 7 Nov 2016 03:25:34 +0000 (12:25 +0900)
Change-Id: I5242e3a2a61298f3f4e958074f4486e7b3b2dd5d
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
packaging/utc/core-alarm-tests.xml
src/utc/alarm/public.list
src/utc/alarm/tct-alarm-core_common_iot.h
src/utc/alarm/tct-alarm-core_mobile.h
src/utc/alarm/tct-alarm-core_tv.h
src/utc/alarm/tct-alarm-core_wearable.h
src/utc/alarm/utc_alarm.c

index 1929206..7739624 100755 (executable)
@@ -15,6 +15,7 @@
        <privileges>
                <privilege>http://tizen.org/privilege/alarm.set</privilege>
                <privilege>http://tizen.org/privilege/alarm.get</privilege>
+               <privilege>http://tizen.org/privilege/notification</privilege>
                <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
        </privileges>
 </manifest>
index efe883e..b3d5e52 100755 (executable)
@@ -12,3 +12,8 @@ alarm_schedule_once_at_date
 alarm_schedule_with_recurrence_week_flag
 alarm_set_global
 alarm_get_global
+alarm_schedule_noti_once_after_delay
+alarm_schedule_noti_after_delay
+alarm_schedule_noti_once_after_delay
+alarm_schedule_noti_with_recurrence_week_flag
+alarm_get_notification
index 099cd32..7fe038f 100755 (executable)
@@ -60,6 +60,20 @@ extern int utc_alarm_set_global_n1(void);
 extern int utc_alarm_set_global_n2(void);
 extern int utc_alarm_get_global_p(void);
 extern int utc_alarm_get_global_n(void);
+extern int utc_alarm_schedule_noti_once_at_date_p(void);
+extern int utc_alarm_schedule_noti_once_at_date_n1(void);
+extern int utc_alarm_schedule_noti_once_at_date_n2(void);
+extern int utc_alarm_schedule_noti_after_delay_p(void);
+extern int utc_alarm_schedule_noti_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_once_after_delay_p(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_p(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n1(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n2(void);
+extern int utc_alarm_get_notification_p(void);
+extern int utc_alarm_get_notification_n(void);
 
 testcase tc_array[] = {
     {"utc_alarm_schedule_after_delay_p", utc_alarm_schedule_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
@@ -101,6 +115,20 @@ testcase tc_array[] = {
     {"utc_alarm_set_global_n2", utc_alarm_set_global_n2, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_p", utc_alarm_get_global_p, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_n", utc_alarm_get_global_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_p", utc_alarm_schedule_noti_once_at_date_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n1", utc_alarm_schedule_noti_once_at_date_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n2", utc_alarm_schedule_noti_once_at_date_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_p", utc_alarm_schedule_noti_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n1", utc_alarm_schedule_noti_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n2", utc_alarm_schedule_noti_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_p", utc_alarm_schedule_noti_once_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n1", utc_alarm_schedule_noti_once_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n2", utc_alarm_schedule_noti_once_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_p", utc_alarm_schedule_noti_with_recurrence_week_flag_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n1", utc_alarm_schedule_noti_with_recurrence_week_flag_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n2", utc_alarm_schedule_noti_with_recurrence_week_flag_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_p", utc_alarm_get_notification_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_n", utc_alarm_get_notification_n, utc_alarm_startup, utc_alarm_cleanup},
     {NULL, NULL}
 };
 
index 099cd32..7fe038f 100755 (executable)
@@ -60,6 +60,20 @@ extern int utc_alarm_set_global_n1(void);
 extern int utc_alarm_set_global_n2(void);
 extern int utc_alarm_get_global_p(void);
 extern int utc_alarm_get_global_n(void);
+extern int utc_alarm_schedule_noti_once_at_date_p(void);
+extern int utc_alarm_schedule_noti_once_at_date_n1(void);
+extern int utc_alarm_schedule_noti_once_at_date_n2(void);
+extern int utc_alarm_schedule_noti_after_delay_p(void);
+extern int utc_alarm_schedule_noti_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_once_after_delay_p(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_p(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n1(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n2(void);
+extern int utc_alarm_get_notification_p(void);
+extern int utc_alarm_get_notification_n(void);
 
 testcase tc_array[] = {
     {"utc_alarm_schedule_after_delay_p", utc_alarm_schedule_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
@@ -101,6 +115,20 @@ testcase tc_array[] = {
     {"utc_alarm_set_global_n2", utc_alarm_set_global_n2, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_p", utc_alarm_get_global_p, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_n", utc_alarm_get_global_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_p", utc_alarm_schedule_noti_once_at_date_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n1", utc_alarm_schedule_noti_once_at_date_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n2", utc_alarm_schedule_noti_once_at_date_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_p", utc_alarm_schedule_noti_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n1", utc_alarm_schedule_noti_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n2", utc_alarm_schedule_noti_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_p", utc_alarm_schedule_noti_once_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n1", utc_alarm_schedule_noti_once_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n2", utc_alarm_schedule_noti_once_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_p", utc_alarm_schedule_noti_with_recurrence_week_flag_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n1", utc_alarm_schedule_noti_with_recurrence_week_flag_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n2", utc_alarm_schedule_noti_with_recurrence_week_flag_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_p", utc_alarm_get_notification_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_n", utc_alarm_get_notification_n, utc_alarm_startup, utc_alarm_cleanup},
     {NULL, NULL}
 };
 
index 099cd32..7fe038f 100755 (executable)
@@ -60,6 +60,20 @@ extern int utc_alarm_set_global_n1(void);
 extern int utc_alarm_set_global_n2(void);
 extern int utc_alarm_get_global_p(void);
 extern int utc_alarm_get_global_n(void);
+extern int utc_alarm_schedule_noti_once_at_date_p(void);
+extern int utc_alarm_schedule_noti_once_at_date_n1(void);
+extern int utc_alarm_schedule_noti_once_at_date_n2(void);
+extern int utc_alarm_schedule_noti_after_delay_p(void);
+extern int utc_alarm_schedule_noti_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_once_after_delay_p(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_p(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n1(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n2(void);
+extern int utc_alarm_get_notification_p(void);
+extern int utc_alarm_get_notification_n(void);
 
 testcase tc_array[] = {
     {"utc_alarm_schedule_after_delay_p", utc_alarm_schedule_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
@@ -101,6 +115,20 @@ testcase tc_array[] = {
     {"utc_alarm_set_global_n2", utc_alarm_set_global_n2, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_p", utc_alarm_get_global_p, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_n", utc_alarm_get_global_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_p", utc_alarm_schedule_noti_once_at_date_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n1", utc_alarm_schedule_noti_once_at_date_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n2", utc_alarm_schedule_noti_once_at_date_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_p", utc_alarm_schedule_noti_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n1", utc_alarm_schedule_noti_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n2", utc_alarm_schedule_noti_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_p", utc_alarm_schedule_noti_once_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n1", utc_alarm_schedule_noti_once_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n2", utc_alarm_schedule_noti_once_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_p", utc_alarm_schedule_noti_with_recurrence_week_flag_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n1", utc_alarm_schedule_noti_with_recurrence_week_flag_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n2", utc_alarm_schedule_noti_with_recurrence_week_flag_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_p", utc_alarm_get_notification_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_n", utc_alarm_get_notification_n, utc_alarm_startup, utc_alarm_cleanup},
     {NULL, NULL}
 };
 
index 099cd32..7fe038f 100755 (executable)
@@ -60,6 +60,20 @@ extern int utc_alarm_set_global_n1(void);
 extern int utc_alarm_set_global_n2(void);
 extern int utc_alarm_get_global_p(void);
 extern int utc_alarm_get_global_n(void);
+extern int utc_alarm_schedule_noti_once_at_date_p(void);
+extern int utc_alarm_schedule_noti_once_at_date_n1(void);
+extern int utc_alarm_schedule_noti_once_at_date_n2(void);
+extern int utc_alarm_schedule_noti_after_delay_p(void);
+extern int utc_alarm_schedule_noti_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_once_after_delay_p(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n1(void);
+extern int utc_alarm_schedule_noti_once_after_delay_n2(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_p(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n1(void);
+extern int utc_alarm_schedule_noti_with_recurrence_week_flag_n2(void);
+extern int utc_alarm_get_notification_p(void);
+extern int utc_alarm_get_notification_n(void);
 
 testcase tc_array[] = {
     {"utc_alarm_schedule_after_delay_p", utc_alarm_schedule_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
@@ -101,6 +115,20 @@ testcase tc_array[] = {
     {"utc_alarm_set_global_n2", utc_alarm_set_global_n2, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_p", utc_alarm_get_global_p, utc_alarm_startup, utc_alarm_cleanup},
     {"utc_alarm_get_global_n", utc_alarm_get_global_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_p", utc_alarm_schedule_noti_once_at_date_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n1", utc_alarm_schedule_noti_once_at_date_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_at_date_n2", utc_alarm_schedule_noti_once_at_date_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_p", utc_alarm_schedule_noti_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n1", utc_alarm_schedule_noti_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_after_delay_n2", utc_alarm_schedule_noti_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_p", utc_alarm_schedule_noti_once_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n1", utc_alarm_schedule_noti_once_after_delay_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_once_after_delay_n2", utc_alarm_schedule_noti_once_after_delay_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_p", utc_alarm_schedule_noti_with_recurrence_week_flag_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n1", utc_alarm_schedule_noti_with_recurrence_week_flag_n1, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_noti_with_recurrence_week_flag_n2", utc_alarm_schedule_noti_with_recurrence_week_flag_n2, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_p", utc_alarm_get_notification_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_notification_n", utc_alarm_get_notification_n, utc_alarm_startup, utc_alarm_cleanup},
     {NULL, NULL}
 };
 
index c02a8ba..a582d64 100755 (executable)
@@ -1396,3 +1396,454 @@ int utc_alarm_get_global_n(void)
 
        return 0;
 }
+
+/**
+ * @testcase           utc_alarm_schedule_noti_once_at_date_p
+ * @since_tizen        3.0
+ * @type                       Positive
+ * @description        Sets an alarm to be triggered at a specific time.
+ * @scenario           Sets an notification alarm.
+ *                             Calls the alarm_schedule_noti_once_at_date() and then
+ *                             checks the return value.
+ */
+int utc_alarm_schedule_noti_once_at_date_p(void)
+{
+       struct tm date;
+       time_t now;
+       notification_h noti;
+       int tid;
+
+       int ret = ALARM_ERROR_NONE;
+
+       time(&now);
+       now += 20;
+       localtime_r(&now, &date);
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = alarm_schedule_noti_once_at_date(noti, &date, &tid);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_NONE);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_once_at_date_n1
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets an alarm to be triggered at a specific time.
+ * @scenario           Sets an notification alarm.
+ *                             Calls the alarm_schedule_noti_once_at_date() with invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_once_at_date_n1(void)
+{
+       struct tm date;
+       time_t now;
+       notification_h noti;
+
+       int ret = ALARM_ERROR_NONE;
+
+       time(&now);
+       now += 20;
+       localtime_r(&now, &date);
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = alarm_schedule_noti_once_at_date(noti, &date, NULL);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_once_at_date_n2
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets an alarm to be triggered at a specific time.
+ * @scenario           Sets an notification alarm.
+ *                             Calls the alarm_schedule_noti_once_at_date() with invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_once_at_date_n2(void)
+{
+       int tid;
+       struct tm date;
+       time_t now;
+
+       int ret = ALARM_ERROR_NONE;
+
+       time(&now);
+       now += 20;
+       localtime_r(&now, &date);
+
+       ret = alarm_schedule_noti_once_at_date(NULL, &date, &tid);
+
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_after_delay_p
+ * @since_tizen        3.0
+ * @type                       Positive
+ * @description        Sets an notification alarm to be triggered after a specific time.
+ * @scenario           Calls the alarm_schedule_noti_after_delay() and then checks the return value.
+ *                             Removes the registerted alarms.
+ */
+int utc_alarm_schedule_noti_after_delay_p(void)
+{
+       int tid;
+       int ret = ALARM_ERROR_NONE;
+       int delay = 1;
+       int period = 1;
+       notification_h noti;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = alarm_schedule_noti_after_delay(noti, delay, period, &tid);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_NONE);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_after_delay_n1
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets an notification alarm to be triggered after a specific time.
+ * @scenario           Calls the alarm_schedule_noti_after_delay() with invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_after_delay_n1(void)
+{
+       int ret = ALARM_ERROR_NONE;
+       int delay = 1;
+       int period = 1;
+       notification_h noti;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = alarm_schedule_noti_after_delay(noti, delay, period, NULL);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_after_delay_n2
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets an notification alarm to be triggered after a specific time.
+ * @scenario           Calls the alarm_schedule_noti_after_delay() with invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_after_delay_n2(void)
+{
+       int tid;
+       int ret = ALARM_ERROR_NONE;
+       int delay = 1;
+       int period = 1;
+
+       ret = alarm_schedule_after_delay(NULL, delay, period, &tid);
+
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_once_after_delay_p
+ * @since_tizen        3.0
+ * @type                       Positive
+ * @description        Sets an alarm to be triggered after a specific time.
+ * @scenario           Calls the alarm_schedule_noti_once_after_delay().
+ *                             Removes the registered notification alarm and then checks the return value.
+ */
+int utc_alarm_schedule_noti_once_after_delay_p(void)
+{
+       int tid;
+       int ret = ALARM_ERROR_NONE;
+       int delay = 1;
+       notification_h noti;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = alarm_schedule_noti_once_after_delay(noti, delay, &tid);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_NONE);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_once_after_delay_n1
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets an alarm to be triggered after a specific time.
+ * @scenario           Calls the alarm_schedule_noti_once_after_delay() with invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_once_after_delay_n1(void)
+{
+       int ret = ALARM_ERROR_NONE;
+       int delay = 1;
+       notification_h noti;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = alarm_schedule_noti_once_after_delay(noti, delay, NULL);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_once_after_delay_n2
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets an alarm to be triggered after a specific time.
+ * @scenario           Calls the alarm_schedule_noti_once_after_delay() with invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_once_after_delay_n2(void)
+{
+       int tid;
+       int ret = ALARM_ERROR_NONE;
+       int delay = 1;
+
+       ret = alarm_schedule_noti_once_after_delay(NULL, delay, &tid);
+
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_with_recurrence_week_flag_p
+ * @since_tizen        3.0
+ * @type                       Positive
+ * @description        Sets a notification alarm to be triggered periodically, starting at a specific time.
+ * @scenario           Sets alarm with ALARM_WEEK_FLAG_MONDAY flag.
+ *                             Calls the alarm_schedule_noti_with_recurrence_week_flag()
+ *                             with ALARM_WEEK_FLAG_MONDAY flag and then checks the return value.
+ */
+int utc_alarm_schedule_noti_with_recurrence_week_flag_p(void)
+{
+       struct tm date;
+       time_t now;
+       int tid;
+       int ret = ALARM_ERROR_NONE;
+       notification_h noti;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       time(&now);
+       localtime_r(&now, &date);
+       date.tm_sec += 3;
+
+       ret = alarm_schedule_noti_with_recurrence_week_flag(noti, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_NONE);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_with_recurrence_week_flag_n1
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets a notification alarm to be triggered periodically, starting at a specific time.
+ * @scenario           Calls the alarm_schedule_with_recurrence_week_flag() with the invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_with_recurrence_week_flag_n1(void)
+{
+       struct tm date;
+       time_t now;
+       int ret = ALARM_ERROR_NONE;
+       notification_h noti;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       time(&now);
+       localtime_r(&now, &date);
+       date.tm_sec += 3;
+
+       ret = alarm_schedule_noti_with_recurrence_week_flag(noti, &date, ALARM_WEEK_FLAG_MONDAY, NULL);
+
+       notification_free(noti);
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_schedule_noti_with_recurrence_week_flag_n2
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Sets a notification alarm to be triggered periodically, starting at a specific time.
+ * @scenario           Calls the alarm_schedule_with_recurrence_week_flag() with the invalid parameter
+ *                             and then checks the return value.
+ */
+int utc_alarm_schedule_noti_with_recurrence_week_flag_n2(void)
+{
+       struct tm date;
+       time_t now;
+       int ret = ALARM_ERROR_NONE;
+       int tid;
+
+       time(&now);
+       localtime_r(&now, &date);
+       date.tm_sec += 3;
+
+       ret = alarm_schedule_noti_with_recurrence_week_flag(NULL, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
+
+       alarm_cancel_all();
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_get_notification_p
+ * @since_tizen        3.0
+ * @type                       Positive
+ * @description        Gets the notification to be invoked when the the alarm is triggered.
+ * @scenario           Sets an alarm and gets the notification by alarm_id.
+ *                             Calls the alarm_schedule_noti_after_delay() and Calls the alarm_get_notification(),
+ *                             and then checks the return value.
+ */
+int utc_alarm_get_notification_p(void)
+{
+       notification_h noti;
+       notification_h noti_return;
+       char *text;
+
+       int ret = ALARM_ERROR_NONE;
+       int tid;
+       int period = 0;
+       int delay = 30;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       ret = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                       "test", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       assert_eq_with_exit(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = alarm_schedule_noti_after_delay(noti, delay, period, &tid);
+       assert_eq_with_exit(ret, ALARM_ERROR_NONE);
+
+       ret = alarm_get_notification(tid, &noti_return);
+
+       alarm_cancel_all();
+
+       ret = notification_get_text(noti_return,
+                       NOTIFICATION_TEXT_TYPE_TITLE, &text);
+       assert_with_exit(!strcmp(text, "test"));
+
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_alarm_get_notification_n
+ * @since_tizen        3.0
+ * @type                       Negative
+ * @description        Gets the notification to be invoked when the the alarm is triggered.
+ * @scenario           Calls the alarm
+ * @scenario           Calls the alarm_get_notification() with the invalid parameter
+ *                             that notification is NULL, and then checks the return value.
+ */
+int utc_alarm_get_notification_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_get_notification(0, NULL);
+
+       assert_eq_with_exit(ret, ALARM_ERROR_INVALID_PARAMETER);
+       normal_exit(0);
+
+       return 0;
+}