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"
12
main (gint argc, gchar **argv)
16
ECalComponent *e_component;
17
icalcomponent *component;
18
icalcomponent *component_final;
24
cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
25
ecal_test_utils_cal_open (cal, FALSE);
27
ecal_test_utils_create_component (cal, "20040109T090000Z", "UTC",
28
"20040109T103000", "UTC", EVENT_SUMMARY, &e_component,
30
component = e_cal_component_get_icalcomponent (e_component);
32
component_final = ecal_test_utils_cal_get_object (cal, uid);
33
ecal_test_utils_cal_assert_objects_equal_shallow (component,
35
icalcomponent_free (component_final);
37
components = ecal_test_utils_cal_get_object_list (cal,
38
"(contains? \"summary\" \"" EVENT_SUMMARY "\")");
39
g_assert (g_list_length (components) == 1);
40
component_final = components->data;
41
ecal_test_utils_cal_assert_objects_equal_shallow (component,
44
ecal_test_utils_cal_remove (cal);
46
e_cal_free_object_list (components);
48
icalcomponent_free (component);