1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
4 #include <libecal/e-cal.h>
5 #include <libical/ical.h>
7 #include "ecal-test-utils.h"
9 #define EVENT_SUMMARY "Creation of new test event"
17 ECalComponent *e_component;
18 icalcomponent *component;
19 icalcomponent *component_final;
25 cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
26 ecal_test_utils_cal_open (cal, FALSE);
28 ecal_test_utils_create_component (cal, "20040109T090000Z", "UTC",
29 "20040109T103000", "UTC", EVENT_SUMMARY, &e_component,
31 component = e_cal_component_get_icalcomponent (e_component);
33 component_final = ecal_test_utils_cal_get_object (cal, uid);
34 ecal_test_utils_cal_assert_objects_equal_shallow (component,
36 icalcomponent_free (component_final);
38 components = ecal_test_utils_cal_get_object_list (cal,
39 "(contains? \"summary\" \"" EVENT_SUMMARY "\")");
40 g_assert (g_list_length (components) == 1);
41 component_final = components->data;
42 ecal_test_utils_cal_assert_objects_equal_shallow (component,
45 e_cal_free_object_list (components);
47 icalcomponent_free (component);