summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2010-11-11 16:14:53 +0200
committerPekka Pessi <Pekka.Pessi@nokia.com>2010-11-11 16:14:53 +0200
commit5d3ae66ca398f2fff381c28a7214f43ba571c2df (patch)
tree70b6965849dddf772b18038b9477914006acb287
parented7355154e5a9796d4525bf6887ec176456c7ebb (diff)
test-modem-call: update test case
-rw-r--r--modem/tests/test-modem-call.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/modem/tests/test-modem-call.c b/modem/tests/test-modem-call.c
index 14260e6..481c3ac 100644
--- a/modem/tests/test-modem-call.c
+++ b/modem/tests/test-modem-call.c
@@ -47,13 +47,14 @@ static void teardown(void)
START_TEST(modem_call_properties)
{
+ DBusGProxy *proxy = modem_ofono_proxy("/path", "org.ofono.VoiceCall");
ModemCall *ci = g_object_new(MODEM_TYPE_CALL,
- "call-service", NULL,
- "object-path", "/path",
- NULL);
+ "call-service", NULL,
+ "dbus-proxy", proxy,
+ NULL);
ModemCallService *client = (gpointer)-1;
- char *object_path = (gpointer)-1;
+ gpointer dbus_proxy = (gpointer)-1;
char *remote = (gpointer)-1;
char *emergency = (gpointer)-1;
unsigned state = (unsigned)-1;
@@ -61,19 +62,19 @@ START_TEST(modem_call_properties)
gboolean onhold = (gboolean)-1, member = (gboolean)-1;
g_object_get(ci,
- "call-service", &client,
- "object-path", &object_path,
- "remote", &remote,
- "state", &state,
- "originating", &originating,
- "terminating", &terminating,
- "emergency", &emergency,
- "onhold", &onhold,
- "member", &member,
+ "call-service", &client,
+ "dbus-proxy", &dbus_proxy,
+ "remote", &remote,
+ "state", &state,
+ "originating", &originating,
+ "terminating", &terminating,
+ "emergency", &emergency,
+ "onhold", &onhold,
+ "member", &member,
NULL);
fail_if(client == (gpointer)-1);
- fail_if(object_path == (gpointer)-1);
+ fail_if(dbus_proxy == (gpointer)-1);
fail_if(remote == (gpointer)-1);
fail_if(state == (unsigned)-1);
fail_if(originating == (gboolean)-1);
@@ -83,7 +84,7 @@ START_TEST(modem_call_properties)
fail_if(member == (gboolean)-1);
fail_unless(client == NULL);
- fail_unless(object_path != NULL && strcmp(object_path, "/path") == 0);
+ fail_unless(dbus_proxy == proxy);
fail_unless(remote == NULL);
fail_unless(state == MODEM_CALL_STATE_INVALID);
fail_unless(originating == FALSE);
@@ -92,9 +93,10 @@ START_TEST(modem_call_properties)
fail_unless(onhold == FALSE);
fail_unless(member == FALSE);
- g_free(object_path);
+ g_object_unref(dbus_proxy);
g_free(remote);
+#if XXX
g_object_set(ci,
"remote", "99001",
"state", MODEM_CALL_STATE_ACTIVE,
@@ -125,6 +127,7 @@ START_TEST(modem_call_properties)
g_free(remote);
g_free(emergency);
+#endif
}
END_TEST