[telepathy-glib/master] Test that core is not ready when we have a new AccountManager
David Laban
david.laban at collabora.co.uk
Tue Nov 24 09:31:16 PST 2009
---
tests/dbus/account-manager.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/tests/dbus/account-manager.c b/tests/dbus/account-manager.c
index 1a478a3..0af552b 100644
--- a/tests/dbus/account-manager.c
+++ b/tests/dbus/account-manager.c
@@ -256,10 +256,19 @@ prepare_action (gpointer script_data,
{
Test *test = (Test *) script_data;
- test->am = tp_account_manager_new (test->dbus);
tp_account_manager_prepare_async (test->am, NULL, finish_prepare_action, test);
}
+static void
+manager_new_action (gpointer script_data,
+ gpointer user_data G_GNUC_UNUSED)
+{
+ Test *test = (Test *) script_data;
+
+ test->am = tp_account_manager_new (test->dbus);
+ script_continue (test);
+}
+
/* We really don't want to have MC being launched during this test */
static void
finish_assert_am_not_activatable_action (TpDBusDaemon *proxy,
@@ -292,6 +301,18 @@ assert_am_not_activatable_action (gpointer script_data,
}
static void
+assert_core_not_ready_action (gpointer script_data,
+ gpointer user_data G_GNUC_UNUSED)
+{
+ Test *test = (Test *) script_data;
+
+ g_assert (!tp_account_manager_is_prepared (test->am,
+ TP_ACCOUNT_MANAGER_FEATURE_CORE));
+
+ script_continue (script_data);
+}
+
+static void
assert_feature_not_ready_action (gpointer script_data,
gpointer user_data)
{
@@ -424,6 +445,8 @@ test_prepare (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
script_append_action (test, assert_am_not_activatable_action, NULL);
+ script_append_action (test, manager_new_action, NULL);
+ script_append_action (test, assert_core_not_ready_action, NULL);
script_append_action (test, prepare_action, NULL);
script_append_action (test, noop_action, NULL);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list