aboutsummaryrefslogtreecommitdiff
path: root/tests/notifications-mock.h
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-05 09:39:27 -0600
committerTed Gould <ted@gould.cx>2015-02-05 09:39:27 -0600
commitca507bc64f0ad0aa399fc7e54bf7a13cc2d94678 (patch)
tree886e6f8ed65f289365ef65543a400feb81f3b39b /tests/notifications-mock.h
parent32b8de20e6633f60ad24f2c8570b7474a5c45fb5 (diff)
downloadayatana-indicator-sound-ca507bc64f0ad0aa399fc7e54bf7a13cc2d94678.tar.gz
ayatana-indicator-sound-ca507bc64f0ad0aa399fc7e54bf7a13cc2d94678.tar.bz2
ayatana-indicator-sound-ca507bc64f0ad0aa399fc7e54bf7a13cc2d94678.zip
Connecting into the indicator test
Diffstat (limited to 'tests/notifications-mock.h')
-rw-r--r--tests/notifications-mock.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/notifications-mock.h b/tests/notifications-mock.h
index 5b7206a..ef5acd4 100644
--- a/tests/notifications-mock.h
+++ b/tests/notifications-mock.h
@@ -24,18 +24,20 @@ class NotificationsMock
DbusTestDbusMock * mock = nullptr;
public:
- AccountsServiceMock () {
+ NotificationsMock () {
mock = dbus_test_dbus_mock_new("org.freedesktop.Notifications");
dbus_test_task_set_bus(DBUS_TEST_TASK(mock), DBUS_TEST_SERVICE_BUS_SESSION);
+ dbus_test_task_set_name(DBUS_TEST_TASK(mock), "Notifications");
}
- ~AccountsServiceMock () {
+ ~NotificationsMock () {
g_debug("Destroying the Accounts Service Mock");
g_clear_object(&mock);
}
operator std::shared_ptr<DbusTestTask> () {
- return std::make_shared<DbusTestTask>(g_object_ref(mock), [](DbusTestTask * task) { g_clear_object(&task); });
+ std::shared_ptr<DbusTestTask> retval(DBUS_TEST_TASK(g_object_ref(mock)), [](DbusTestTask * task) { g_clear_object(&task); });
+ return retval;
}
operator DbusTestTask* () {
@@ -45,8 +47,4 @@ class NotificationsMock
operator DbusTestDbusMock* () {
return mock;
}
-
- DbusTestDbusMockObject * get_sound () {
- return soundobj;
- }
};