[Telepathy-commits] [telepathy-glib/master] TestTextChannelNull: record how many times various methods were called
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Nov 28 07:05:10 PST 2008
---
tests/lib/textchan-null.c | 9 +++++++++
tests/lib/textchan-null.h | 4 ++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/tests/lib/textchan-null.c b/tests/lib/textchan-null.c
index 20ef3a5..0a197c6 100644
--- a/tests/lib/textchan-null.c
+++ b/tests/lib/textchan-null.c
@@ -236,6 +236,10 @@ static void
channel_get_channel_type (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
+ TestTextChannelNull *self = TEST_TEXT_CHANNEL_NULL (iface);
+
+ self->get_channel_type_called++;
+
tp_svc_channel_return_from_get_channel_type (context,
TP_IFACE_CHANNEL_TYPE_TEXT);
}
@@ -246,6 +250,8 @@ channel_get_handle (TpSvcChannel *iface,
{
TestTextChannelNull *self = TEST_TEXT_CHANNEL_NULL (iface);
+ self->get_handle_called++;
+
tp_svc_channel_return_from_get_handle (context, TP_HANDLE_TYPE_CONTACT,
self->priv->handle);
}
@@ -255,6 +261,9 @@ channel_get_interfaces (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
const char *interfaces[] = { NULL };
+ TestTextChannelNull *self = TEST_TEXT_CHANNEL_NULL (iface);
+
+ self->get_interfaces_called++;
tp_svc_channel_return_from_get_interfaces (context, interfaces);
}
diff --git a/tests/lib/textchan-null.h b/tests/lib/textchan-null.h
index aa8bc57..9a596cc 100644
--- a/tests/lib/textchan-null.h
+++ b/tests/lib/textchan-null.h
@@ -49,6 +49,10 @@ struct _TestTextChannelNull {
GObject parent;
TpTextMixin text;
+ guint get_handle_called;
+ guint get_interfaces_called;
+ guint get_channel_type_called;
+
TestTextChannelNullPrivate *priv;
};
--
1.5.6.5
More information about the Telepathy-commits
mailing list