Changing the license headers and all the licesing stuff to LGPL version 2 OR LATER.
[hildon] / tests / check-hildon-note.c
1 /*
2  * This file is a part of hildon tests
3  *
4  * Copyright (C) 2006, 2007 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24
25 #include <stdlib.h>
26 #include <string.h>
27 #include <check.h>
28 #include <gtk/gtkmain.h>
29 #include "test_suites.h"
30 #include "hildon-window.h"
31 #include "hildon-note.h"
32
33 /* -------------------- Fixtures -------------------- */
34
35 static HildonNote *note = NULL;
36 static GtkWindow * n_window = NULL;
37
38 static void 
39 fx_setup_default_note ()
40 {
41   int argc = 0;
42
43   gtk_init(&argc, NULL);
44
45   n_window = GTK_WINDOW(hildon_window_new());
46  /* Check window object has been created properly */
47   fail_if(!HILDON_IS_WINDOW(n_window),
48           "hildon-note: Window creation failed.");
49 }
50
51 static void 
52 fx_teardown_default_note ()
53 {
54     gtk_widget_destroy (GTK_WIDGET (n_window));
55 }
56
57 /* -------------------- Test cases -------------------- */
58
59 /* ----- Test case for new_confirmation -----*/
60 /**
61  * Purpose: Check that note dialog is properly created with description regular values. 
62  * Cases considered:
63  *    - Create new confirmation note with description set to TEST_STRING
64  *    - Create new confirmation note with description set to "".
65  *
66  */
67 START_TEST (test_new_confirmation_regular)
68 {
69   const gchar * description = NULL;
70   const gchar * ret_description = NULL;
71   GValue value={0, };
72   GValue enum_value={0, };
73   HildonNoteType note_type;
74
75   g_value_init (&value, G_TYPE_STRING);
76   g_value_init (&enum_value, G_TYPE_INT);
77
78   /* Test 1: create new confirmation note with description set to TEST_STRING */
79   description = TEST_STRING;
80   note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
81   fail_if(!HILDON_IS_NOTE(note),
82           "hildon-note: Creation failed with hildon_note_new_confirmation");
83
84   g_object_get_property(G_OBJECT (note),"description",&value);
85   ret_description = g_value_get_string (&value);
86   fail_if( strcmp (description,ret_description) != 0,
87            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
88            description,ret_description);
89     
90   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
91   note_type = g_value_get_int(&enum_value);
92   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
93            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
94
95   gtk_widget_destroy (GTK_WIDGET (note));
96   note=NULL;
97
98   /* Test 2: create new confirmation note with description set to "" */
99   description = "";
100   note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
101   fail_if(!HILDON_IS_NOTE(note),
102           "hildon-note: Creation failed with hildon_note_new_confirmation");
103
104   g_object_get_property(G_OBJECT (note),"description",&value);
105   ret_description = g_value_get_string (&value);
106   fail_if( strcmp (description,ret_description) != 0,
107            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
108            description,ret_description);
109
110   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
111   note_type = g_value_get_int(&enum_value);
112   fail_unless( note_type == HILDON_NOTE_TYPE_CONFIRMATION,
113                "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
114
115   gtk_widget_destroy (GTK_WIDGET (note));
116   note=NULL;
117
118
119   g_value_unset(&value);
120   g_value_unset(&enum_value);    
121 }
122 END_TEST
123
124 /**
125  * Purpose: Check that note dialog is properly created with description invalid values. 
126  * Cases considered:
127  *    - Create new confirmation note with window set to NULL.
128  *    - Create new confirmation note with description set to "NULL".
129  *
130  */
131 START_TEST (test_new_confirmation_invalid)
132 {
133   const gchar * ret_description = NULL;
134   GValue value={0, };
135   GValue enum_value={0, };
136   HildonNoteType note_type;
137   HildonNote * invalid_note;
138    
139   g_value_init (&value, G_TYPE_STRING);
140   g_value_init (&enum_value, G_TYPE_INT);
141
142   /* Test 1: create new confirmation note with window set to "NULL" */
143   invalid_note = HILDON_NOTE(hildon_note_new_confirmation(NULL,""));
144   fail_if(!HILDON_IS_NOTE(invalid_note),
145           "hildon-note: Creation failed with hildon_note_new_confirmation");
146
147   g_object_get_property(G_OBJECT (invalid_note),"description",&value);
148   ret_description = g_value_get_string (&value);
149   fail_if( strcmp ("",ret_description) != 0,
150            "hildon-note: Empty description was not set properly on creation. Returned description: %s",
151            ret_description);
152
153   g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
154   note_type = g_value_get_int(&enum_value);
155   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
156            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
157
158   gtk_widget_destroy (GTK_WIDGET (invalid_note));
159   invalid_note=NULL;
160
161   /* Test 2: create new confirmation note with description set to "NULL" */
162   invalid_note = HILDON_NOTE(hildon_note_new_confirmation(n_window,NULL));
163   fail_if(HILDON_IS_NOTE(invalid_note),
164           "hildon-note: Creation succeeded with hildon_note_new_confirmation with NULL description");
165
166   g_value_unset(&value);
167   g_value_unset(&enum_value);
168 }
169 END_TEST
170
171 /* ----- Test case for new_information -----*/
172 /**
173  * Purpose: Check that note dialog is properly created with description regular values. 
174  * Cases considered:
175  *    - Create new information note with description set to TEST_STRING.
176  *    - Create new information note with description set to "".
177  *
178  */
179 START_TEST (test_new_information_regular)
180 {
181   const gchar * description = NULL;
182   const gchar * ret_description = NULL;
183   GValue value={0, };
184   GValue enum_value={0, };
185   HildonNoteType note_type;
186
187   g_value_init (&value, G_TYPE_STRING);
188   g_value_init (&enum_value, G_TYPE_INT);
189
190   /* Test 1: create new information note with description set to "Standard question?" */
191   description = TEST_STRING;
192   note = HILDON_NOTE(hildon_note_new_information(n_window,description));
193   fail_if(!HILDON_IS_NOTE(note),
194           "hildon-note: Creation failed with hildon_note_new_information");
195
196   g_object_get_property(G_OBJECT (note),"description",&value);
197   ret_description = g_value_get_string (&value);
198   fail_if( strcmp (description,ret_description) != 0,
199            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
200            description,ret_description);
201
202   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
203   note_type = g_value_get_int(&enum_value);   
204   fail_if( note_type != HILDON_NOTE_TYPE_INFORMATION_THEME,
205            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_INFORMATION_THEME)",note_type);
206
207   gtk_widget_destroy (GTK_WIDGET (note));
208   note=NULL;
209
210   /* Test 2: create new information note with description set to "" */
211   description = "";
212   note = HILDON_NOTE(hildon_note_new_information(n_window,description));
213   fail_if(!HILDON_IS_NOTE(note),
214           "hildon-note: Creation failed with hildon_note_new_information");
215
216   g_object_get_property(G_OBJECT (note),"description",&value);
217   ret_description = g_value_get_string (&value);
218   fail_if( strcmp (description,ret_description) != 0,
219            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
220            description,ret_description);
221
222   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
223   note_type = g_value_get_int(&enum_value);
224   fail_if( note_type != HILDON_NOTE_TYPE_INFORMATION_THEME,
225            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_INFORMATION_THEME)",note_type);
226
227   gtk_widget_destroy (GTK_WIDGET (note));
228   note=NULL;
229
230   g_value_unset(&value);
231   g_value_unset(&enum_value);       
232 }
233 END_TEST
234
235   
236 /**
237  * Purpose: Check that note dialog is properly created with description invalid values. 
238  * Cases considered:
239  *    - Create new information note with window set to NULL.
240  *    - Create new information note with description set to "NULL".
241  *
242  */
243 START_TEST (test_new_information_invalid)
244 {
245   const gchar * ret_description = NULL;
246   GValue value={0, };
247   GValue enum_value={0, };
248   HildonNoteType note_type;
249   HildonNote * invalid_note;
250    
251   g_value_init (&value, G_TYPE_STRING);
252   g_value_init (&enum_value, G_TYPE_INT);
253
254   /* Test 1: create new information note with window set to "NULL" */
255   invalid_note = HILDON_NOTE(hildon_note_new_information(NULL,""));
256   fail_if(!HILDON_IS_NOTE(invalid_note),
257           "hildon-note: Creation failed with hildon_note_new_information");
258
259   g_object_get_property(G_OBJECT (invalid_note),"description",&value);
260   ret_description = g_value_get_string (&value);
261   fail_if( strcmp ("",ret_description) != 0,
262            "hildon-note: Empty description was not set properly on creation. Returned description: %s",
263            ret_description);
264
265   g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
266   note_type = g_value_get_int(&enum_value);
267   fail_if( note_type != HILDON_NOTE_TYPE_INFORMATION_THEME,
268            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_INFORMATION_THEME)",note_type);
269     
270   gtk_widget_destroy (GTK_WIDGET (invalid_note));
271   invalid_note=NULL;
272
273   /* Test 2: create new information note with description set to "NULL" */
274   invalid_note = HILDON_NOTE(hildon_note_new_information(n_window,NULL));
275   fail_if(HILDON_IS_NOTE(invalid_note),
276           "hildon-note: Creation succeeded with hildon_note_new_information where msg == NULL");
277
278   g_value_unset(&value);
279   g_value_unset(&enum_value);
280 }
281 END_TEST
282
283 /* ----- Test case for new_confirmation_with_icon_name -----*/
284 /**
285  * Purpose: Check that note dialog is properly created with description regular values. 
286  * Cases considered:
287  *    - Create new confirmation note with description set to TEST_STRING and icon name "qgn_list_cp_calibration".
288  *    - Create new confirmation note with description set to "" and icon name NULL.
289  *
290  */
291 START_TEST (test_new_confirmation_with_icon_name_regular)
292 {
293   const gchar * description = NULL;
294   const gchar * ret_description = NULL;
295   const gchar *icon_name = NULL;
296   const gchar * ret_icon_name = NULL;
297   GValue value={0, };
298   GValue icon_name_value={0, };
299   GValue enum_value={0, };
300   HildonNoteType note_type;
301
302   g_value_init (&value, G_TYPE_STRING);
303   g_value_init (&icon_name_value, G_TYPE_STRING);
304   g_value_init (&enum_value, G_TYPE_INT);
305
306   /* Test 1: create new confirmation note with description set to TEST_STRING */
307   description = TEST_STRING;
308   icon_name="qgn_list_cp_calibration";
309   note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
310   fail_if(!HILDON_IS_NOTE(note),
311           "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
312
313     g_object_get_property(G_OBJECT (note),"description",&value);
314   ret_description = g_value_get_string (&value);
315   fail_if( strcmp (description,ret_description) != 0,
316            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
317            description,ret_description);
318   
319   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
320   note_type = g_value_get_int(&enum_value);  
321   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
322            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
323   
324   g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
325   ret_icon_name = g_value_get_string (&icon_name_value);
326   fail_if( strcmp (icon_name,ret_icon_name) != 0,
327            "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
328            icon_name,ret_icon_name);
329
330   gtk_widget_destroy (GTK_WIDGET (note));
331   note=NULL;
332   
333   /* Test 2: create new confirmation note with description set to "" and icon name set to NULL */
334   description = "";
335   icon_name=NULL;
336   note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
337   fail_if(!HILDON_IS_NOTE(note),
338           "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
339   
340   g_object_get_property(G_OBJECT (note),"description",&value);
341   ret_description = g_value_get_string (&value);
342   fail_if( strcmp (description,ret_description) != 0,
343            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
344            description,ret_description);
345   
346   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
347   note_type = g_value_get_int(&enum_value);  
348   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
349            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
350   
351   g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
352   ret_icon_name = g_value_get_string (&icon_name_value);
353   fail_if( ret_icon_name != NULL,
354            "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
355            icon_name,ret_icon_name);
356   
357   gtk_widget_destroy (GTK_WIDGET (note));
358   note=NULL;
359   
360   g_value_unset(&value);
361   g_value_unset(&icon_name_value);
362   g_value_unset(&enum_value);
363   
364 }
365 END_TEST
366
367 /**
368  * Purpose: Check that note dialog is properly created with description invalid values. 
369  * Cases considered:
370  *    - Create new confirmation note with window set to NULL.
371  *    - Create new confirmation note with description set to "NULL".
372  *
373  */
374 START_TEST (test_new_confirmation_with_icon_name_invalid)
375 {
376   const gchar * ret_description = NULL;
377   const gchar * ret_icon_name = NULL;
378   GValue value={0, };
379   GValue enum_value={0, };
380   GValue icon_name_value={0, };
381   HildonNoteType note_type;
382   HildonNote * invalid_note;
383    
384   g_value_init (&value, G_TYPE_STRING);
385   g_value_init (&icon_name_value, G_TYPE_STRING);
386   g_value_init (&enum_value, G_TYPE_INT);
387
388   /* Test 1: create new confirmation note with window set to "NULL" */
389   invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(NULL,"",""));
390   fail_if(!HILDON_IS_NOTE(invalid_note),
391           "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
392
393   g_object_get_property(G_OBJECT (invalid_note),"description",&value);
394   ret_description = g_value_get_string (&value);
395   fail_if( strcmp ("",ret_description) != 0,
396            "hildon-note: Description "" was not set properly on creation. Returned description: %s",
397            ret_description);
398
399   g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
400   ret_icon_name = g_value_get_string (&icon_name_value);
401   fail_if( strcmp ("",ret_icon_name) != 0,
402            "hildon-note: Description "" was not set properly on creation. Returned description: %s",
403            ret_icon_name);
404
405   g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
406   note_type = g_value_get_int(&enum_value);
407   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
408            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
409
410   gtk_widget_destroy (GTK_WIDGET (invalid_note));
411   invalid_note=NULL;
412
413   /* Test 2: create new confirmation note with description set to "NULL" */
414   invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,NULL,"qgn_list_cp_calibration"));
415   fail_if(HILDON_IS_NOTE(invalid_note),
416           "hildon-note: Creation succeeded with hildon_note_new_confirmation_with_icon_name with message == NULL");
417
418   g_value_unset(&icon_name_value);
419   g_value_unset(&value);
420   g_value_unset(&enum_value);
421 }
422 END_TEST
423
424 /* ----- Test case for new_cancel_with_progress_bar -----*/
425
426 /**
427  * Purpose: Check that note dialog is properly created with description regular values. 
428  * Cases considered:
429  *    - Create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar.
430  *    - Create new confirmation note with description set to "" and correct GtkProgressBar.
431  *
432  */
433 START_TEST (test_new_cancel_with_progress_bar_regular)
434 {
435   const gchar * description = NULL;
436   const gchar * ret_description = NULL;
437   GValue value={0, };
438   GValue enum_value={0, };
439   GtkProgressBar * progress_bar=NULL;
440    
441   HildonNoteType note_type;
442
443   g_value_init (&value, G_TYPE_STRING);
444   g_value_init (&enum_value, G_TYPE_INT);
445
446   /* Test 1: create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar */
447   description = TEST_STRING;
448   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
449   fail_if(!HILDON_IS_NOTE(note),
450           "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
451
452   g_object_get_property(G_OBJECT (note),"description",&value);
453   ret_description = g_value_get_string (&value);
454   fail_if( strcmp (description,ret_description) != 0,
455            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
456            description,ret_description);
457
458   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
459   note_type = g_value_get_int(&enum_value);   
460   fail_if( note_type != HILDON_NOTE_TYPE_PROGRESSBAR,
461            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_PROGRESSBAR)",note_type);
462
463   gtk_widget_destroy (GTK_WIDGET (note));
464   note=NULL;
465
466   /* Test 2: create new confirmation note with description set to "" */
467   description = "";
468   progress_bar = GTK_PROGRESS_BAR(gtk_progress_bar_new());
469   fail_if(!GTK_IS_PROGRESS_BAR(progress_bar),
470           "hildon-note: Progress bar creation failed in hildon_note_new_cancel_with_progress_bar");
471
472   gtk_progress_bar_set_fraction(progress_bar,0.5);
473     
474   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
475   fail_if(!HILDON_IS_NOTE(note),
476           "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
477
478   g_object_get_property(G_OBJECT (note),"description",&value);
479   ret_description = g_value_get_string (&value);
480   fail_if( strcmp (description,ret_description) != 0,
481            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
482            description,ret_description);
483
484   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
485   note_type = g_value_get_int(&enum_value);   
486   fail_if( note_type != HILDON_NOTE_TYPE_PROGRESSBAR,
487            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_PROGRESSBAR)",note_type);
488
489   gtk_widget_destroy (GTK_WIDGET (progress_bar));
490   gtk_widget_destroy (GTK_WIDGET (note));
491   note=NULL;
492
493   g_value_unset(&value);
494   g_value_unset(&enum_value);
495 }
496 END_TEST
497
498 /**
499  * Purpose: Check that note dialog is properly created with description invalid values. 
500  * Cases considered:
501  *    - Create new confirmation note with description set to NULL.
502  *    - Create new confirmation note with window set to NULL.
503  *
504  */
505 START_TEST (test_new_cancel_with_progress_bar_invalid)
506 {
507   const gchar * description = NULL;
508   const gchar * ret_description = NULL;
509   GValue value={0, };
510   GValue enum_value={0, };
511    
512   HildonNoteType note_type;
513
514   g_value_init (&value, G_TYPE_STRING);
515   g_value_init (&enum_value, G_TYPE_INT);
516
517   /* Test 1: create new confirmation note with description set to NULL */
518   description = NULL;
519   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,NULL));
520   fail_if(HILDON_IS_NOTE(note),
521           "hildon-note: Creation succeeded with hildon_note_new_cancel_with_progress_bar where msg == NULL");
522
523   /* Test 2: create new confirmation note with window set to NULL */
524   description = "";
525   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(NULL,description,NULL));
526   fail_if(!HILDON_IS_NOTE(note),
527           "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
528
529   g_object_get_property(G_OBJECT (note),"description",&value);
530   ret_description = g_value_get_string (&value);
531   fail_if( strcmp(description,ret_description) != 0,
532            "hildon-note: Empty description was not set properly on creation",
533            description,ret_description);
534
535   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
536   note_type = g_value_get_int(&enum_value);
537   fail_if( note_type != HILDON_NOTE_TYPE_PROGRESSBAR,
538            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_PROGRESSBAR)",note_type);
539
540   gtk_widget_destroy (GTK_WIDGET (note));
541   note=NULL;
542
543   g_value_unset(&value);
544   g_value_unset(&enum_value);
545 }
546 END_TEST
547
548   
549   
550 /* ---------- Suite creation ---------- */
551 Suite *create_hildon_note_suite()
552 {
553   /* Create the suite */
554   Suite *s = suite_create("HildonNote");
555
556   /* Create test cases */
557   TCase *tc1 = tcase_create("new_confirmation");
558   TCase *tc2 = tcase_create("new_confirmation_with_icon_name");
559   TCase *tc3 = tcase_create("new_information");
560   TCase *tc4 = tcase_create("new_cancel_with_progress_bar");
561
562   /* Create test case for hildon_note_new_confirmation and add it to the suite */
563   tcase_add_checked_fixture(tc1, fx_setup_default_note, fx_teardown_default_note);
564   tcase_add_test(tc1, test_new_confirmation_regular);
565   tcase_add_test(tc1, test_new_confirmation_invalid);
566   suite_add_tcase (s, tc1);
567
568   /* Create test case for hildon_note_new_confirmation_with_icon_name and add it to the suite */
569   tcase_add_checked_fixture(tc2, fx_setup_default_note, fx_teardown_default_note);
570   tcase_add_test(tc2, test_new_confirmation_with_icon_name_regular);
571   tcase_add_test(tc2, test_new_confirmation_with_icon_name_invalid);
572   suite_add_tcase (s, tc2);
573
574   /* Create test case for hildon_note_new_with_information and add it to the suite */
575   tcase_add_checked_fixture(tc3, fx_setup_default_note, fx_teardown_default_note);
576   tcase_add_test(tc3, test_new_information_regular);
577   tcase_add_test(tc3, test_new_information_invalid);
578   suite_add_tcase (s, tc3);
579
580   /* Create test case for hildon_note_new_with_progress_bar and add it to the suite */
581   tcase_add_checked_fixture(tc4, fx_setup_default_note, fx_teardown_default_note);
582   tcase_add_test(tc4, test_new_cancel_with_progress_bar_regular);
583   tcase_add_test(tc4, test_new_cancel_with_progress_bar_invalid);
584   suite_add_tcase (s, tc4);
585
586   /* Return created suite */
587   return s;
588 }