Initialize Tizen 2.3
[framework/api/application.git] / TC / testcase / utc_ui_notification.c
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18
19 #include <tet_api.h>
20 #include <app.h>
21
22
23 static void startup(void);
24 static void cleanup(void);
25
26 void (*tet_startup)(void) = startup;
27 void (*tet_cleanup)(void) = cleanup;
28
29 static void utc_notification_create_positive(void);
30 static void utc_notification_create_negative(void);
31
32 static void utc_notification_create_ongoing_positive(void);
33 static void utc_notification_create_ongoing_negative(void);
34
35 static void utc_notification_destroy_positive(void);
36 static void utc_notification_destroy_negative(void);
37
38 static void utc_notification_is_ongoing_positive1(void);
39 static void utc_notification_is_ongoing_positive2(void);
40 static void utc_notification_is_ongoing_negative1(void);
41 static void utc_notification_is_ongoing_negative2(void);
42
43 static void utc_notification_set_icon_positive1(void);
44 static void utc_notification_set_icon_positive2(void);
45 static void utc_notification_set_icon_negative1(void);
46
47 static void utc_notification_get_icon_positive(void);
48 static void utc_notification_get_icon_negative1(void);
49 static void utc_notification_get_icon_negative2(void);
50
51 static void utc_notification_set_time_positive1(void);
52 static void utc_notification_set_time_positive2(void);
53 static void utc_notification_set_time_negative1(void);
54
55 static void utc_notification_get_time_positive(void);
56 static void utc_notification_get_time_negative1(void);
57 static void utc_notification_get_time_negative2(void);
58
59 static void utc_notification_set_title_positive1(void);
60 static void utc_notification_set_title_positive2(void);
61 static void utc_notification_set_title_negative1(void);
62
63 static void utc_notification_get_title_positive(void);
64 static void utc_notification_get_title_negative1(void);
65 static void utc_notification_get_title_negative2(void);
66
67 static void utc_notification_set_content_positive1(void);
68 static void utc_notification_set_content_positive2(void);
69 static void utc_notification_set_content_negative1(void);
70
71 static void utc_notification_get_content_positive(void);
72 static void utc_notification_get_content_negative1(void);
73 static void utc_notification_get_content_negative2(void);
74
75 static void utc_notification_set_service_positive1(void);
76 static void utc_notification_set_service_positive2(void);
77 static void utc_notification_set_service_negative1(void);
78
79 static void utc_notification_get_service_positive(void);
80 static void utc_notification_get_service_negative1(void);
81 static void utc_notification_get_service_negative2(void);
82
83 static void utc_notification_set_sound_positive1(void);
84 static void utc_notification_set_sound_positive2(void);
85 static void utc_notification_set_sound_negative1(void);
86
87 static void utc_notification_get_sound_positive(void);
88 static void utc_notification_get_sound_negative1(void);
89 static void utc_notification_get_sound_negative2(void);
90
91 static void utc_notification_set_vibration_positive1(void);
92 static void utc_notification_set_vibration_positive2(void);
93 static void utc_notification_set_vibration_negative1(void);
94
95 static void utc_notification_get_vibration_positive(void);
96 static void utc_notification_get_vibration_negative1(void);
97 static void utc_notification_get_vibration_negative2(void);
98
99 static void utc_notification_post_negative1(void);
100
101 static void utc_notification_cancel_negative1(void);
102
103 static void utc_notification_cancel_all_positive(void);
104
105 static void utc_notification_cancel_all_by_type_positive1(void);
106 static void utc_notification_cancel_all_by_type_positive2(void);
107
108 static void utc_notification_update_negative1(void);
109
110 static void utc_notification_update_progress_negative1(void);
111
112 static void utc_notification_foreach_notification_posted_positive1(void);
113 static void utc_notification_foreach_notification_posted_positive2(void);
114 static void utc_notification_foreach_notification_posted_negative1(void);
115 static void utc_notification_foreach_notification_posted_negative2(void);
116
117 static void utc_notification_clone_positive1(void);
118 static void utc_notification_clone_positive2(void);
119 static void utc_notification_clone_positive3(void);
120 static void utc_notification_clone_positive4(void);
121 static void utc_notification_clone_negative1(void);
122 static void utc_notification_clone_negative2(void);
123
124 struct tet_testlist tet_testlist[] = {
125         {utc_notification_create_positive, 1},
126         {utc_notification_create_negative, 1},
127         {utc_notification_create_ongoing_positive, 1},
128         {utc_notification_create_ongoing_negative, 1},
129         {utc_notification_destroy_positive, 1},
130         {utc_notification_destroy_negative, 1},
131         {utc_notification_is_ongoing_positive1, 1},
132         {utc_notification_is_ongoing_positive2, 1},
133         {utc_notification_is_ongoing_negative1, 1},
134         {utc_notification_is_ongoing_negative2, 1},
135         {utc_notification_set_icon_positive1, 1},
136         {utc_notification_set_icon_positive2, 1},
137         {utc_notification_set_icon_negative1, 1},
138         {utc_notification_get_icon_positive, 1},
139         {utc_notification_get_icon_negative1, 1},
140         {utc_notification_get_icon_negative2, 1},
141         {utc_notification_set_time_positive1, 1},
142         {utc_notification_set_time_positive2, 1},
143         {utc_notification_set_time_negative1, 1},
144         {utc_notification_get_time_positive, 1},
145         {utc_notification_get_time_negative1, 1},
146         {utc_notification_get_time_negative2, 1},
147         {utc_notification_set_title_positive1, 1},
148         {utc_notification_set_title_positive2, 1},
149         {utc_notification_set_title_negative1, 1},
150         {utc_notification_get_title_positive, 1},
151         {utc_notification_get_title_negative1, 1},
152         {utc_notification_get_title_negative2, 1},
153         {utc_notification_set_content_positive1, 1},
154         {utc_notification_set_content_positive2, 1},
155         {utc_notification_set_content_negative1, 1},
156         {utc_notification_get_content_positive, 1},
157         {utc_notification_get_content_negative1, 1},
158         {utc_notification_get_content_negative2, 1},
159         {utc_notification_set_service_positive1, 1},
160         {utc_notification_set_service_positive2, 1},
161         {utc_notification_set_service_negative1, 1},
162         {utc_notification_get_service_positive, 1},
163         {utc_notification_get_service_negative1, 1},
164         {utc_notification_get_service_negative2, 1},
165         {utc_notification_set_sound_positive1, 1},
166         {utc_notification_set_sound_positive2, 1},
167         {utc_notification_set_sound_negative1, 1},
168         {utc_notification_get_sound_positive, 1},
169         {utc_notification_get_sound_negative1, 1},
170         {utc_notification_get_sound_negative2, 1},
171         {utc_notification_set_vibration_positive1, 1},
172         {utc_notification_set_vibration_positive2, 1},
173         {utc_notification_set_vibration_negative1, 1},
174         {utc_notification_get_vibration_positive, 1},
175         {utc_notification_get_vibration_negative1, 1},
176         {utc_notification_get_vibration_negative2, 1},
177         {utc_notification_post_negative1, 1},
178         {utc_notification_cancel_negative1, 1},
179         {utc_notification_cancel_all_positive, 1},
180         {utc_notification_cancel_all_by_type_positive1, 1},
181         {utc_notification_cancel_all_by_type_positive2, 1},
182         {utc_notification_update_negative1, 1},
183         {utc_notification_update_progress_negative1, 1},
184         {utc_notification_foreach_notification_posted_positive1, 1},
185         {utc_notification_foreach_notification_posted_positive2, 1},
186         {utc_notification_foreach_notification_posted_negative1, 1},
187         {utc_notification_foreach_notification_posted_negative2, 1},
188         {utc_notification_clone_positive1, 1},
189         {utc_notification_clone_positive2, 1},
190         {utc_notification_clone_positive3, 1},
191         {utc_notification_clone_positive4, 1},
192         {utc_notification_clone_negative1, 1},
193         {utc_notification_clone_negative2, 1},
194         {NULL, 0},
195 };
196
197 static void startup(void)
198 {
199
200 }
201
202
203 static void cleanup(void)
204 {
205         /* end of TC */
206 }
207
208 static void utc_notification_create_positive(void)
209 {
210         const char *API_NAME = __FUNCTION__;
211         int retcode = UI_NOTIFICATION_ERROR_NONE;
212
213         ui_notification_h notification;
214
215         retcode = ui_notification_create(false, &notification);
216
217         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
218                 dts_pass(API_NAME, "passed");
219         } else {
220                 dts_fail(API_NAME, "failed");
221         }
222 }
223
224 static void utc_notification_create_negative(void)
225 {
226         const char *API_NAME = __FUNCTION__;
227         int retcode = UI_NOTIFICATION_ERROR_NONE;
228
229         retcode = ui_notification_create(false, NULL);
230
231         if (retcode != UI_NOTIFICATION_ERROR_NONE) {
232                 dts_pass(API_NAME, "passed");
233         } else {
234                 dts_fail(API_NAME, "failed");
235         }
236 }
237
238 static void utc_notification_create_ongoing_positive(void)
239 {
240         const char *API_NAME = __FUNCTION__;
241         int retcode = UI_NOTIFICATION_ERROR_NONE;
242
243         ui_notification_h notification;
244
245         retcode = ui_notification_create(true, &notification);
246
247         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
248                 dts_pass(API_NAME, "passed");
249         } else {
250                 dts_fail(API_NAME, "failed");
251         }
252 }
253
254 static void utc_notification_create_ongoing_negative(void)
255 {
256         const char *API_NAME = __FUNCTION__;
257         int retcode = UI_NOTIFICATION_ERROR_NONE;
258
259         retcode = ui_notification_create(true, NULL);
260
261         if (retcode != UI_NOTIFICATION_ERROR_NONE) {
262                 dts_pass(API_NAME, "passed");
263         } else {
264                 dts_fail(API_NAME, "failed");
265         }
266 }
267
268 static void utc_notification_destroy_positive(void)
269 {
270         const char *API_NAME = __FUNCTION__;
271         int retcode = UI_NOTIFICATION_ERROR_NONE;
272
273         ui_notification_h notification;
274
275         ui_notification_create(true, &notification);
276
277         retcode = ui_notification_destroy(notification);
278
279         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
280                 dts_pass(API_NAME, "passed");
281         } else {
282                 dts_fail(API_NAME, "failed");
283         }
284 }
285
286 static void utc_notification_destroy_negative(void)
287 {
288         const char *API_NAME = __FUNCTION__;
289         int retcode = UI_NOTIFICATION_ERROR_NONE;
290
291         retcode = ui_notification_destroy(NULL);
292
293         if (retcode != UI_NOTIFICATION_ERROR_NONE) {
294                 dts_pass(API_NAME, "passed");
295         } else {
296                 dts_fail(API_NAME, "failed");
297         }
298 }
299
300 static void utc_notification_is_ongoing_positive1()
301 {
302         const char *API_NAME = __FUNCTION__;
303         int retcode = UI_NOTIFICATION_ERROR_NONE;
304
305         ui_notification_h notification;
306         bool value = false;
307
308         ui_notification_create(true, &notification);
309
310         retcode = ui_notification_is_ongoing(notification, &value);
311
312         if (retcode == UI_NOTIFICATION_ERROR_NONE && value == true) {
313                 dts_pass(API_NAME, "passed");
314         } else {
315                 dts_fail(API_NAME, "failed");
316         }
317 }
318
319 static void utc_notification_is_ongoing_positive2()
320 {
321         const char *API_NAME = __FUNCTION__;
322         int retcode = UI_NOTIFICATION_ERROR_NONE;
323
324         ui_notification_h notification;
325         bool value = false;
326
327         ui_notification_create(false, &notification);
328
329         retcode = ui_notification_is_ongoing(notification, &value);
330
331         if (retcode == UI_NOTIFICATION_ERROR_NONE && value == false) {
332                 dts_pass(API_NAME, "passed");
333         } else {
334                 dts_fail(API_NAME, "failed");
335         }
336 }
337
338 static void utc_notification_is_ongoing_negative1()
339 {
340         const char *API_NAME = __FUNCTION__;
341         int retcode = UI_NOTIFICATION_ERROR_NONE;
342
343         ui_notification_h notification;
344
345         ui_notification_create(true, &notification);
346
347         retcode = ui_notification_is_ongoing(notification, NULL);
348
349         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
350                 dts_pass(API_NAME, "passed");
351         } else {
352                 dts_fail(API_NAME, "failed");
353         }
354 }
355
356 static void utc_notification_is_ongoing_negative2()
357 {
358         const char *API_NAME = __FUNCTION__;
359         int retcode = UI_NOTIFICATION_ERROR_NONE;
360
361         ui_notification_h notification;
362         bool value;
363
364         retcode = ui_notification_is_ongoing(NULL, &value);
365
366         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
367                 dts_pass(API_NAME, "passed");
368         } else {
369                 dts_fail(API_NAME, "failed");
370         }
371 }
372
373 static void utc_notification_set_icon_positive1(void)
374 {
375         const char *API_NAME = __FUNCTION__;
376         int retcode = UI_NOTIFICATION_ERROR_NONE;
377
378         ui_notification_h notification;
379
380         ui_notification_create(false, &notification);
381
382         retcode = ui_notification_set_icon(notification, "ICON");
383
384         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
385                 dts_pass(API_NAME, "passed");
386         } else {
387                 dts_fail(API_NAME, "failed");
388         }
389 }
390
391 static void utc_notification_set_icon_positive2(void)
392 {
393         const char *API_NAME = __FUNCTION__;
394         int retcode = UI_NOTIFICATION_ERROR_NONE;
395
396         ui_notification_h notification;
397
398         ui_notification_create(false, &notification);
399
400         ui_notification_set_icon(notification, "ICON");
401
402         retcode = ui_notification_set_icon(notification, NULL);
403
404         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
405                 dts_pass(API_NAME, "passed");
406         } else {
407                 dts_fail(API_NAME, "failed");
408         }
409 }
410
411 static void utc_notification_set_icon_negative1(void)
412 {
413         const char *API_NAME = __FUNCTION__;
414         int retcode = UI_NOTIFICATION_ERROR_NONE;
415
416         retcode = ui_notification_set_icon(NULL, "ICON");
417
418         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
419                 dts_pass(API_NAME, "passed");
420         } else {
421                 dts_fail(API_NAME, "failed");
422         }
423 }
424
425 static void utc_notification_get_icon_positive(void)
426 {
427         const char *API_NAME = __FUNCTION__;
428         int retcode = UI_NOTIFICATION_ERROR_NONE;
429
430         ui_notification_h notification;
431         char *value;
432
433         ui_notification_create(false, &notification);
434
435         ui_notification_set_icon(notification, "ICON");
436
437         retcode = ui_notification_get_icon(notification, &value);
438
439         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
440                 dts_pass(API_NAME, "passed");
441         } else {
442                 dts_fail(API_NAME, "failed");
443         }
444 }
445
446 static void utc_notification_get_icon_negative1(void)
447 {
448         const char *API_NAME = __FUNCTION__;
449         int retcode = UI_NOTIFICATION_ERROR_NONE;
450
451         char *value;
452
453         retcode = ui_notification_get_icon(NULL, &value);
454
455         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
456                 dts_pass(API_NAME, "passed");
457         } else {
458                 dts_fail(API_NAME, "failed");
459         }
460 }
461
462 static void utc_notification_get_icon_negative2(void)
463 {
464         const char *API_NAME = __FUNCTION__;
465         int retcode = UI_NOTIFICATION_ERROR_NONE;
466
467         ui_notification_h notification;
468
469         ui_notification_create(false, &notification);
470
471         ui_notification_set_icon(notification, "ICON");
472
473         retcode = ui_notification_get_icon(notification, NULL);
474
475         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
476                 dts_pass(API_NAME, "passed");
477         } else {
478                 dts_fail(API_NAME, "failed");
479         }
480 }
481
482 static void utc_notification_set_time_positive1(void)
483 {
484         const char *API_NAME = __FUNCTION__;
485         int retcode = UI_NOTIFICATION_ERROR_NONE;
486
487         ui_notification_h notification;
488         time_t t;
489         struct tm tm_t;
490
491         ui_notification_create(false, &notification);
492
493         time(&t);
494         localtime_r(&t, &tm_t);
495
496         retcode = ui_notification_set_time(notification, &tm_t);
497
498         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
499                 dts_pass(API_NAME, "passed");
500         } else {
501                 dts_fail(API_NAME, "failed");
502         }
503 }
504
505 static void utc_notification_set_time_positive2(void)
506 {
507         const char *API_NAME = __FUNCTION__;
508         int retcode = UI_NOTIFICATION_ERROR_NONE;
509
510         ui_notification_h notification;
511         time_t t;
512         struct tm tm_t;
513
514         ui_notification_create(false, &notification);
515
516         time(&t);
517         localtime_r(&t, &tm_t);
518
519         ui_notification_set_time(notification, &tm_t);
520
521         retcode = ui_notification_set_time(notification, NULL);
522
523         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
524                 dts_pass(API_NAME, "passed");
525         } else {
526                 dts_fail(API_NAME, "failed");
527         }
528 }
529
530 static void utc_notification_set_time_negative1(void)
531 {
532         const char *API_NAME = __FUNCTION__;
533         int retcode = UI_NOTIFICATION_ERROR_NONE;
534
535         time_t t;
536         struct tm tm_t;
537
538         time(&t);
539         localtime_r(&t, &tm_t);
540
541         retcode = ui_notification_set_time(NULL, NULL);
542
543         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
544                 dts_pass(API_NAME, "passed");
545         } else {
546                 dts_fail(API_NAME, "failed");
547         }
548 }
549
550 static void utc_notification_get_time_positive(void)
551 {
552         const char *API_NAME = __FUNCTION__;
553         int retcode = UI_NOTIFICATION_ERROR_NONE;
554
555         ui_notification_h notification;
556         time_t t;
557         struct tm tm_t;
558         struct tm *value;
559
560         ui_notification_create(false, &notification);
561
562         time(&t);
563         localtime_r(&t, &tm_t);
564
565         ui_notification_set_time(notification, &tm_t);
566
567         retcode = ui_notification_get_time(notification, &value);
568
569         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
570                 dts_pass(API_NAME, "passed");
571         } else {
572                 dts_fail(API_NAME, "failed");
573         }
574 }
575
576 static void utc_notification_get_time_negative1(void)
577 {
578         const char *API_NAME = __FUNCTION__;
579         int retcode = UI_NOTIFICATION_ERROR_NONE;
580
581         struct tm *value;
582
583         retcode = ui_notification_get_time(NULL, &value);
584
585         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
586                 dts_pass(API_NAME, "passed");
587         } else {
588                 dts_fail(API_NAME, "failed");
589         }
590 }
591
592 static void utc_notification_get_time_negative2(void)
593 {
594         const char *API_NAME = __FUNCTION__;
595         int retcode = UI_NOTIFICATION_ERROR_NONE;
596
597         ui_notification_h notification;
598         time_t t;
599         struct tm tm_t;
600
601         ui_notification_create(false, &notification);
602
603         time(&t);
604         localtime_r(&t, &tm_t);
605
606         ui_notification_set_time(notification, &tm_t);
607
608         retcode = ui_notification_get_time(notification, NULL);
609
610         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
611                 dts_pass(API_NAME, "passed");
612         } else {
613                 dts_fail(API_NAME, "failed");
614         }
615 }
616
617 static void utc_notification_set_title_positive1(void)
618 {
619         const char *API_NAME = __FUNCTION__;
620         int retcode = UI_NOTIFICATION_ERROR_NONE;
621
622         ui_notification_h notification;
623
624         ui_notification_create(false, &notification);
625
626         retcode = ui_notification_set_title(notification, "TITLE");
627
628         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
629                 dts_pass(API_NAME, "passed");
630         } else {
631                 dts_fail(API_NAME, "failed");
632         }
633 }
634
635 static void utc_notification_set_title_positive2(void)
636 {
637         const char *API_NAME = __FUNCTION__;
638         int retcode = UI_NOTIFICATION_ERROR_NONE;
639
640         ui_notification_h notification;
641
642         ui_notification_create(false, &notification);
643
644         ui_notification_set_title(notification, "TITLE");
645
646         retcode = ui_notification_set_title(notification, NULL);
647
648         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
649                 dts_pass(API_NAME, "passed");
650         } else {
651                 dts_fail(API_NAME, "failed");
652         }
653 }
654
655 static void utc_notification_set_title_negative1(void)
656 {
657         const char *API_NAME = __FUNCTION__;
658         int retcode = UI_NOTIFICATION_ERROR_NONE;
659
660         retcode = ui_notification_set_title(NULL, "TITLE");
661
662         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
663                 dts_pass(API_NAME, "passed");
664         } else {
665                 dts_fail(API_NAME, "failed");
666         }
667 }
668
669 static void utc_notification_get_title_positive(void)
670 {
671         const char *API_NAME = __FUNCTION__;
672         int retcode = UI_NOTIFICATION_ERROR_NONE;
673
674         ui_notification_h notification;
675         char *value;
676
677         ui_notification_create(false, &notification);
678
679         ui_notification_set_title(notification, "TITLE");
680
681         retcode = ui_notification_get_title(notification, &value);
682
683         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
684                 dts_pass(API_NAME, "passed");
685         } else {
686                 dts_fail(API_NAME, "failed");
687         }
688 }
689
690 static void utc_notification_get_title_negative1(void)
691 {
692         const char *API_NAME = __FUNCTION__;
693         int retcode = UI_NOTIFICATION_ERROR_NONE;
694
695         char *value;
696
697         retcode = ui_notification_get_title(NULL, &value);
698
699         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
700                 dts_pass(API_NAME, "passed");
701         } else {
702                 dts_fail(API_NAME, "failed");
703         }
704 }
705
706 static void utc_notification_get_title_negative2(void)
707 {
708         const char *API_NAME = __FUNCTION__;
709         int retcode = UI_NOTIFICATION_ERROR_NONE;
710
711         ui_notification_h notification;
712
713         ui_notification_create(false, &notification);
714
715         ui_notification_set_title(notification, "TITLE");
716
717         retcode = ui_notification_get_title(notification, NULL);
718
719         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
720                 dts_pass(API_NAME, "passed");
721         } else {
722                 dts_fail(API_NAME, "failed");
723         }
724 }
725
726 static void utc_notification_set_content_positive1(void)
727 {
728         const char *API_NAME = __FUNCTION__;
729         int retcode = UI_NOTIFICATION_ERROR_NONE;
730
731         ui_notification_h notification;
732
733         ui_notification_create(false, &notification);
734
735         retcode = ui_notification_set_content(notification, "CONTENT");
736
737         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
738                 dts_pass(API_NAME, "passed");
739         } else {
740                 dts_fail(API_NAME, "failed");
741         }
742 }
743
744 static void utc_notification_set_content_positive2(void)
745 {
746         const char *API_NAME = __FUNCTION__;
747         int retcode = UI_NOTIFICATION_ERROR_NONE;
748
749         ui_notification_h notification;
750
751         ui_notification_create(false, &notification);
752
753         ui_notification_set_content(notification, "CONTENT");
754
755         retcode = ui_notification_set_content(notification, NULL);
756
757         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
758                 dts_pass(API_NAME, "passed");
759         } else {
760                 dts_fail(API_NAME, "failed");
761         }
762 }
763
764 static void utc_notification_set_content_negative1(void)
765 {
766         const char *API_NAME = __FUNCTION__;
767         int retcode = UI_NOTIFICATION_ERROR_NONE;
768
769         retcode = ui_notification_set_content(NULL, "CONTENT");
770
771         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
772                 dts_pass(API_NAME, "passed");
773         } else {
774                 dts_fail(API_NAME, "failed");
775         }
776 }
777
778 static void utc_notification_get_content_positive(void)
779 {
780         const char *API_NAME = __FUNCTION__;
781         int retcode = UI_NOTIFICATION_ERROR_NONE;
782
783         ui_notification_h notification;
784         char *value;
785
786         ui_notification_create(false, &notification);
787
788         ui_notification_set_content(notification, "CONTENT");
789
790         retcode = ui_notification_get_content(notification, &value);
791
792         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
793                 dts_pass(API_NAME, "passed");
794         } else {
795                 dts_fail(API_NAME, "failed");
796         }
797 }
798
799 static void utc_notification_get_content_negative1(void)
800 {
801         const char *API_NAME = __FUNCTION__;
802         int retcode = UI_NOTIFICATION_ERROR_NONE;
803
804         char *value;
805
806         retcode = ui_notification_get_content(NULL, &value);
807
808         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
809                 dts_pass(API_NAME, "passed");
810         } else {
811                 dts_fail(API_NAME, "failed");
812         }
813 }
814
815 static void utc_notification_get_content_negative2(void)
816 {
817         const char *API_NAME = __FUNCTION__;
818         int retcode = UI_NOTIFICATION_ERROR_NONE;
819
820         ui_notification_h notification;
821
822         ui_notification_create(false, &notification);
823
824         ui_notification_set_content(notification, "CONTENT");
825
826         retcode = ui_notification_get_content(notification, NULL);
827
828         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
829                 dts_pass(API_NAME, "passed");
830         } else {
831                 dts_fail(API_NAME, "failed");
832         }
833 }
834
835 static void utc_notification_set_service_positive1(void)
836 {
837         const char *API_NAME = __FUNCTION__;
838         int retcode = UI_NOTIFICATION_ERROR_NONE;
839
840         ui_notification_h notification;
841         service_h service;
842
843         ui_notification_create(false, &notification);
844
845         service_create(&service);
846
847         retcode = ui_notification_set_service(notification, service);
848
849         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
850                 dts_pass(API_NAME, "passed");
851         } else {
852                 dts_fail(API_NAME, "failed");
853         }
854 }
855
856 static void utc_notification_set_service_positive2(void)
857 {
858         const char *API_NAME = __FUNCTION__;
859         int retcode = UI_NOTIFICATION_ERROR_NONE;
860
861         ui_notification_h notification;
862         service_h service;
863
864         ui_notification_create(false, &notification);
865
866         service_create(&service);
867
868         ui_notification_set_service(notification, service);
869
870         retcode = ui_notification_set_service(notification, NULL);
871
872         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
873                 dts_pass(API_NAME, "passed");
874         } else {
875                 dts_fail(API_NAME, "failed");
876         }
877 }
878
879 static void utc_notification_set_service_negative1(void)
880 {
881         const char *API_NAME = __FUNCTION__;
882         int retcode = UI_NOTIFICATION_ERROR_NONE;
883
884         service_h service;
885         service_create(&service);
886
887         retcode = ui_notification_set_service(NULL, service);
888
889         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
890                 dts_pass(API_NAME, "passed");
891         } else {
892                 dts_fail(API_NAME, "failed");
893         }
894 }
895
896 static void utc_notification_get_service_positive(void)
897 {
898         const char *API_NAME = __FUNCTION__;
899         int retcode = UI_NOTIFICATION_ERROR_NONE;
900
901         ui_notification_h notification;
902         service_h service;
903         service_h value;
904
905         ui_notification_create(false, &notification);
906
907         service_create(&service);
908
909         ui_notification_set_service(notification, service);
910
911         retcode = ui_notification_get_service(notification, &value);
912
913         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
914                 dts_pass(API_NAME, "passed");
915         } else {
916                 dts_fail(API_NAME, "failed");
917         }
918 }
919
920 static void utc_notification_get_service_negative1(void)
921 {
922         const char *API_NAME = __FUNCTION__;
923         int retcode = UI_NOTIFICATION_ERROR_NONE;
924
925         service_h value;
926
927         retcode = ui_notification_get_service(NULL, &value);
928
929         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
930                 dts_pass(API_NAME, "passed");
931         } else {
932                 dts_fail(API_NAME, "failed");
933         }
934 }
935
936 static void utc_notification_get_service_negative2(void)
937 {
938         const char *API_NAME = __FUNCTION__;
939         int retcode = UI_NOTIFICATION_ERROR_NONE;
940
941         ui_notification_h notification;
942         service_h service;
943
944         ui_notification_create(false, &notification);
945
946         service_create(&service);
947
948         ui_notification_set_service(notification, service);
949
950         retcode = ui_notification_get_service(notification, NULL);
951
952         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
953                 dts_pass(API_NAME, "passed");
954         } else {
955                 dts_fail(API_NAME, "failed");
956         }
957 }
958
959 static void utc_notification_set_sound_positive1(void)
960 {
961         const char *API_NAME = __FUNCTION__;
962         int retcode = UI_NOTIFICATION_ERROR_NONE;
963
964         ui_notification_h notification;
965
966         ui_notification_create(false, &notification);
967
968         retcode = ui_notification_set_sound(notification, "/usr/share/svi/sound/operation/new_chat.wav");
969
970         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
971                 dts_pass(API_NAME, "passed");
972         } else {
973                 dts_fail(API_NAME, "failed");
974         }
975 }
976
977 static void utc_notification_set_sound_positive2(void)
978 {
979         const char *API_NAME = __FUNCTION__;
980         int retcode = UI_NOTIFICATION_ERROR_NONE;
981
982         ui_notification_h notification;
983
984         ui_notification_create(false, &notification);
985
986         ui_notification_set_sound(notification, "/usr/share/svi/sound/operation/new_chat.wav");
987
988         retcode = ui_notification_set_sound(notification, NULL);
989
990         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
991                 dts_pass(API_NAME, "passed");
992         } else {
993                 dts_fail(API_NAME, "failed");
994         }
995 }
996
997 static void utc_notification_set_sound_negative1(void)
998 {
999         const char *API_NAME = __FUNCTION__;
1000         int retcode = UI_NOTIFICATION_ERROR_NONE;
1001
1002         retcode = ui_notification_set_sound(NULL, "/usr/share/svi/sound/operation/new_chat.wav");
1003
1004         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1005                 dts_pass(API_NAME, "passed");
1006         } else {
1007                 dts_fail(API_NAME, "failed");
1008         }
1009 }
1010
1011 static void utc_notification_get_sound_positive(void)
1012 {
1013         const char *API_NAME = __FUNCTION__;
1014         int retcode = UI_NOTIFICATION_ERROR_NONE;
1015
1016         ui_notification_h notification;
1017         char *value;
1018
1019         ui_notification_create(false, &notification);
1020
1021         ui_notification_set_sound(notification, "/usr/share/svi/sound/operation/new_chat.wav");
1022
1023         retcode = ui_notification_get_sound(notification, &value);
1024
1025         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1026                 dts_pass(API_NAME, "passed");
1027         } else {
1028                 dts_fail(API_NAME, "failed");
1029         }
1030 }
1031
1032 static void utc_notification_get_sound_negative1(void)
1033 {
1034         const char *API_NAME = __FUNCTION__;
1035         int retcode = UI_NOTIFICATION_ERROR_NONE;
1036
1037         char *value;
1038
1039         retcode = ui_notification_get_sound(NULL, &value);
1040
1041         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1042                 dts_pass(API_NAME, "passed");
1043         } else {
1044                 dts_fail(API_NAME, "failed");
1045         }
1046 }
1047
1048 static void utc_notification_get_sound_negative2(void)
1049 {
1050         const char *API_NAME = __FUNCTION__;
1051         int retcode = UI_NOTIFICATION_ERROR_NONE;
1052
1053         ui_notification_h notification;
1054
1055         ui_notification_create(false, &notification);
1056
1057         ui_notification_set_sound(notification, "/usr/share/svi/sound/operation/new_chat.wav");
1058
1059         retcode = ui_notification_get_sound(notification, NULL);
1060
1061         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1062                 dts_pass(API_NAME, "passed");
1063         } else {
1064                 dts_fail(API_NAME, "failed");
1065         }
1066 }
1067
1068 static void utc_notification_set_vibration_positive1(void)
1069 {
1070         const char *API_NAME = __FUNCTION__;
1071         int retcode = UI_NOTIFICATION_ERROR_NONE;
1072
1073         ui_notification_h notification;
1074
1075         ui_notification_create(false, &notification);
1076
1077         retcode = ui_notification_set_vibration(notification, true);
1078
1079         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1080                 dts_pass(API_NAME, "passed");
1081         } else {
1082                 dts_fail(API_NAME, "failed");
1083         }
1084 }
1085
1086 static void utc_notification_set_vibration_positive2(void)
1087 {
1088         const char *API_NAME = __FUNCTION__;
1089         int retcode = UI_NOTIFICATION_ERROR_NONE;
1090
1091         ui_notification_h notification;
1092
1093         ui_notification_create(false, &notification);
1094
1095         ui_notification_set_vibration(notification, true);
1096
1097         retcode = ui_notification_set_vibration(notification, false);
1098
1099         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1100                 dts_pass(API_NAME, "passed");
1101         } else {
1102                 dts_fail(API_NAME, "failed");
1103         }
1104 }
1105
1106 static void utc_notification_set_vibration_negative1(void)
1107 {
1108         const char *API_NAME = __FUNCTION__;
1109         int retcode = UI_NOTIFICATION_ERROR_NONE;
1110
1111         retcode = ui_notification_set_vibration(NULL, false);
1112
1113         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1114                 dts_pass(API_NAME, "passed");
1115         } else {
1116                 dts_fail(API_NAME, "failed");
1117         }
1118 }
1119
1120 static void utc_notification_get_vibration_positive(void)
1121 {
1122         const char *API_NAME = __FUNCTION__;
1123         int retcode = UI_NOTIFICATION_ERROR_NONE;
1124
1125         ui_notification_h notification;
1126         bool value;
1127
1128         ui_notification_create(false, &notification);
1129
1130         ui_notification_set_vibration(notification, true);
1131
1132         retcode = ui_notification_get_vibration(notification, &value);
1133
1134         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1135                 dts_pass(API_NAME, "passed");
1136         } else {
1137                 dts_fail(API_NAME, "failed");
1138         }
1139 }
1140
1141 static void utc_notification_get_vibration_negative1(void)
1142 {
1143         const char *API_NAME = __FUNCTION__;
1144         int retcode = UI_NOTIFICATION_ERROR_NONE;
1145
1146         bool value;
1147
1148         retcode = ui_notification_get_vibration(NULL, &value);
1149
1150         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1151                 dts_pass(API_NAME, "passed");
1152         } else {
1153                 dts_fail(API_NAME, "failed");
1154         }
1155 }
1156
1157 static void utc_notification_get_vibration_negative2(void)
1158 {
1159         const char *API_NAME = __FUNCTION__;
1160         int retcode = UI_NOTIFICATION_ERROR_NONE;
1161
1162         ui_notification_h notification;
1163
1164         ui_notification_create(false, &notification);
1165
1166         ui_notification_set_vibration(notification, true);
1167
1168         retcode = ui_notification_get_vibration(notification, NULL);
1169
1170         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1171                 dts_pass(API_NAME, "passed");
1172         } else {
1173                 dts_fail(API_NAME, "failed");
1174         }
1175 }
1176
1177 static void utc_notification_post_negative1(void)
1178 {
1179         const const char *API_NAME = __FUNCTION__;
1180         int retcode = UI_NOTIFICATION_ERROR_NONE;
1181
1182         retcode = ui_notification_post(NULL);
1183
1184         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1185                 dts_pass(API_NAME, "passed");
1186         } else {
1187                 dts_fail(API_NAME, "failed");
1188         }
1189 }
1190
1191 static void utc_notification_cancel_negative1(void)
1192 {
1193         const const char *API_NAME = __FUNCTION__;
1194         int retcode = UI_NOTIFICATION_ERROR_NONE;
1195
1196         retcode = ui_notification_cancel(NULL);
1197
1198         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1199                 dts_pass(API_NAME, "passed");
1200         } else {
1201                 dts_fail(API_NAME, "failed");
1202         }
1203 }
1204
1205 static void utc_notification_cancel_all_positive(void)
1206 {
1207         const const char *API_NAME = __FUNCTION__;
1208
1209         ui_notification_cancel_all();
1210
1211         dts_pass(API_NAME, "passed");
1212 }
1213
1214 static void utc_notification_cancel_all_by_type_positive1(void)
1215 {
1216         const const char *API_NAME = __FUNCTION__;
1217
1218         ui_notification_cancel_all_by_type(false);
1219
1220         dts_pass(API_NAME, "passed");
1221 }
1222
1223 static void utc_notification_cancel_all_by_type_positive2(void)
1224 {
1225         const const char *API_NAME = __FUNCTION__;
1226
1227         ui_notification_cancel_all_by_type(true);
1228
1229         dts_pass(API_NAME, "passed");
1230 }
1231
1232 static void utc_notification_update_negative1(void)
1233 {
1234         const const char *API_NAME = __FUNCTION__;
1235         int retcode = UI_NOTIFICATION_ERROR_NONE;
1236
1237         retcode = ui_notification_update(NULL);
1238
1239         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1240                 dts_pass(API_NAME, "passed");
1241         } else {
1242                 dts_fail(API_NAME, "failed");
1243         }
1244 }
1245
1246 static void utc_notification_update_progress_negative1(void)
1247 {
1248         const const char *API_NAME = __FUNCTION__;
1249         int retcode = UI_NOTIFICATION_ERROR_NONE;
1250
1251         retcode = ui_notification_update_progress(NULL, UI_NOTIFICATION_PROGRESS_TYPE_PERCENTAGE, 0);
1252
1253         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1254                 dts_pass(API_NAME, "passed");
1255         } else {
1256                 dts_fail(API_NAME, "failed");
1257         }
1258 }
1259
1260 static bool utc_ui_notification_cb(ui_notification_h notification, void *user_data)
1261 {
1262         return true;
1263 }
1264
1265 static void utc_notification_foreach_notification_posted_positive1(void)
1266 {
1267         const char *API_NAME = __FUNCTION__;
1268         int retcode = UI_NOTIFICATION_ERROR_NONE;
1269
1270         retcode = ui_notification_foreach_notification_posted(true, utc_ui_notification_cb, NULL);
1271
1272         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1273                 dts_pass(API_NAME, "passed");
1274         } else {
1275                 dts_fail(API_NAME, "failed");
1276         }
1277 }
1278
1279 static void utc_notification_foreach_notification_posted_positive2(void)
1280 {
1281         const char *API_NAME = __FUNCTION__;
1282         int retcode = UI_NOTIFICATION_ERROR_NONE;
1283
1284         retcode = ui_notification_foreach_notification_posted(false, utc_ui_notification_cb, NULL);
1285
1286         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1287                 dts_pass(API_NAME, "passed");
1288         } else {
1289                 dts_fail(API_NAME, "failed");
1290         }
1291 }
1292
1293 static void utc_notification_foreach_notification_posted_negative1(void)
1294 {
1295         const const char *API_NAME = __FUNCTION__;
1296         int retcode = UI_NOTIFICATION_ERROR_NONE;
1297
1298         retcode = ui_notification_foreach_notification_posted(true, NULL, NULL);
1299
1300         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1301                 dts_pass(API_NAME, "passed");
1302         } else {
1303                 dts_fail(API_NAME, "failed");
1304         }
1305 }
1306
1307 static void utc_notification_foreach_notification_posted_negative2(void)
1308 {
1309         const const char *API_NAME = __FUNCTION__;
1310         int retcode = UI_NOTIFICATION_ERROR_NONE;
1311
1312         retcode = ui_notification_foreach_notification_posted(true, NULL, NULL);
1313
1314         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1315                 dts_pass(API_NAME, "passed");
1316         } else {
1317                 dts_fail(API_NAME, "failed");
1318         }
1319 }
1320
1321 static void utc_notification_clone_positive1(void)
1322 {
1323         const char *API_NAME = __FUNCTION__;
1324         int retcode = UI_NOTIFICATION_ERROR_NONE;
1325
1326         ui_notification_h notification;
1327         ui_notification_h clone;
1328
1329         ui_notification_create(true, &notification);
1330
1331         retcode = ui_notification_clone(&clone, notification);
1332
1333         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1334                 dts_pass(API_NAME, "passed");
1335         } else {
1336                 dts_fail(API_NAME, "failed");
1337         }
1338 }
1339
1340 static void utc_notification_clone_positive2(void)
1341 {
1342         const char *API_NAME = __FUNCTION__;
1343         int retcode = UI_NOTIFICATION_ERROR_NONE;
1344
1345         ui_notification_h notification;
1346         ui_notification_h clone;
1347
1348         ui_notification_create(false, &notification);
1349
1350         retcode = ui_notification_clone(&clone, notification);
1351
1352         if (retcode == UI_NOTIFICATION_ERROR_NONE) {
1353                 dts_pass(API_NAME, "passed");
1354         } else {
1355                 dts_fail(API_NAME, "failed");
1356         }
1357 }
1358
1359 static void utc_notification_clone_positive3(void)
1360 {
1361         const char *API_NAME = __FUNCTION__;
1362         int retcode = UI_NOTIFICATION_ERROR_NONE;
1363
1364         ui_notification_h notification;
1365         ui_notification_h clone;
1366         bool ongoing = true;
1367         bool ongoing_clone = false;
1368         char *title = "TITLE";
1369         char *content = "CONTENT";
1370         char *icon = "ICON_PATH";
1371         char *title_clone = NULL;
1372         char *content_clone  = NULL;
1373         char *icon_clone  = NULL;
1374         int equal = 0;
1375
1376         ui_notification_create(ongoing, &notification);
1377
1378         ui_notification_set_title(notification, title);
1379         ui_notification_set_content(notification, content);
1380         ui_notification_set_icon(notification, icon);
1381
1382         retcode = ui_notification_clone(&clone, notification);
1383
1384         if (!ui_notification_is_ongoing(clone, &ongoing_clone))
1385         {
1386                 if (ongoing == ongoing_clone)
1387                 {
1388                         equal++;
1389                 }
1390         }
1391
1392         if (!ui_notification_get_title(clone, &title_clone))
1393         {
1394                 if (!strcmp(title, title_clone))
1395                 {
1396                         equal++;
1397                 }
1398         }
1399
1400         if (!ui_notification_get_content(clone, &content_clone))
1401         {
1402                 if (!strcmp(content, content_clone))
1403                 {
1404                         equal++;
1405                 }
1406         }
1407
1408         if (!ui_notification_get_icon(clone, &icon_clone))
1409         {
1410                 if (!strcmp(icon, icon_clone))
1411                 {
1412                         equal++;
1413                 }
1414         }
1415
1416         if (retcode == UI_NOTIFICATION_ERROR_NONE && equal == 4) {
1417                 dts_pass(API_NAME, "passed");
1418         } else {
1419                 dts_fail(API_NAME, "failed");
1420         }
1421 }
1422
1423 static void utc_notification_clone_positive4(void)
1424 {
1425         const char *API_NAME = __FUNCTION__;
1426         int retcode = UI_NOTIFICATION_ERROR_NONE;
1427
1428         ui_notification_h notification;
1429         ui_notification_h clone;
1430         bool ongoing = false;
1431         bool ongoing_clone = false;
1432         char *title = "TITLE";
1433         char *content = "CONTENT";
1434         char *icon = "ICON_PATH";
1435         char *title_clone = NULL;
1436         char *content_clone  = NULL;
1437         char *icon_clone  = NULL;
1438         int equal = 0;
1439
1440         ui_notification_create(ongoing, &notification);
1441
1442         ui_notification_set_title(notification, title);
1443         ui_notification_set_content(notification, content);
1444         ui_notification_set_icon(notification, icon);
1445
1446         retcode = ui_notification_clone(&clone, notification);
1447
1448         if (!ui_notification_is_ongoing(clone, &ongoing_clone))
1449         {
1450                 if (ongoing == ongoing_clone)
1451                 {
1452                         equal++;
1453                 }
1454         }
1455
1456         if (!ui_notification_get_title(clone, &title_clone))
1457         {
1458                 if (!strcmp(title, title_clone))
1459                 {
1460                         equal++;
1461                 }
1462         }
1463
1464         if (!ui_notification_get_content(clone, &content_clone))
1465         {
1466                 if (!strcmp(content, content_clone))
1467                 {
1468                         equal++;
1469                 }
1470         }
1471
1472         if (!ui_notification_get_icon(clone, &icon_clone))
1473         {
1474                 if (!strcmp(icon, icon_clone))
1475                 {
1476                         equal++;
1477                 }
1478         }
1479
1480         if (retcode == UI_NOTIFICATION_ERROR_NONE && equal == 4) {
1481                 dts_pass(API_NAME, "passed");
1482         } else {
1483                 dts_fail(API_NAME, "failed");
1484         }
1485
1486 }
1487
1488 static void utc_notification_clone_negative1(void)
1489 {
1490         const const char *API_NAME = __FUNCTION__;
1491         int retcode = UI_NOTIFICATION_ERROR_NONE;
1492
1493         ui_notification_h notification;
1494         ui_notification_create(true, &notification);
1495
1496         retcode = ui_notification_clone(NULL, notification);
1497
1498         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1499                 dts_pass(API_NAME, "passed");
1500         } else {
1501                 dts_fail(API_NAME, "failed");
1502         }
1503 }
1504
1505 static void utc_notification_clone_negative2(void)
1506 {
1507         const const char *API_NAME = __FUNCTION__;
1508         int retcode = UI_NOTIFICATION_ERROR_NONE;
1509
1510         ui_notification_h clone;
1511
1512         retcode = ui_notification_clone(&clone, NULL);
1513
1514         if (retcode == UI_NOTIFICATION_ERROR_INVALID_PARAMETER) {
1515                 dts_pass(API_NAME, "passed");
1516         } else {
1517                 dts_fail(API_NAME, "failed");
1518         }
1519 }