* Added a dbus test that updates (Send&Receive) the default account
authorSergio Villar Senin <svillar@igalia.com>
Fri, 19 Oct 2007 16:37:27 +0000 (16:37 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 19 Oct 2007 16:37:27 +0000 (16:37 +0000)
pmo-trunk-r3541

tests/dbus_api/Makefile.am
tests/dbus_api/test_update_account.c [new file with mode: 0644]

index 110f24c..07bea5f 100644 (file)
@@ -19,14 +19,16 @@ objects=\
        $(MODEST_OGS_LIBS) \
        ${top_srcdir}/libmodest-dbus-client/libmodest-dbus-client-1.0.la
         
-noinst_PROGRAMS = test_mail_to \
-                 test_open_message   \
-                 test_search         \
-                 test_delete_message \
-                 test_compose_mail \
-                 test_open_default_inbox \
-                 test_get_folders \
-                 test_top_application
+noinst_PROGRAMS = \
+       test_mail_to \
+       test_open_message   \
+       test_search         \
+       test_delete_message \
+       test_compose_mail \
+       test_open_default_inbox \
+       test_get_folders \
+       test_top_application \
+       test_update_account
 
 test_mail_to_SOURCES = test_mail_to.c
 test_mail_to_LDADD = $(objects)
@@ -51,3 +53,6 @@ test_get_folders_LDADD = $(objects)
 
 test_top_application_SOURCES = test_top_application.c
 test_top_application_LDADD = $(objects)
+
+test_update_account_SOURCES = test_update_account.c
+test_update_account_LDADD = $(objects)
diff --git a/tests/dbus_api/test_update_account.c b/tests/dbus_api/test_update_account.c
new file mode 100644 (file)
index 0000000..1d9e1f2
--- /dev/null
@@ -0,0 +1,20 @@
+#include <libmodest-dbus-client/libmodest-dbus-client.h>
+#include <stdio.h>
+
+int
+main (int argc, char *argv[])
+{
+       osso_context_t *osso_context;
+
+       osso_context = osso_initialize ("test_update_account",
+                                       "0.0.1",
+                                       TRUE,
+                                       NULL);
+              
+       if (osso_context == NULL) {
+               g_printerr ("osso_initialize() failed.\n");
+           return -1;
+       }
+
+       return libmodest_dbus_client_send_and_receive (osso_context);
+}