summaryrefslogtreecommitdiffstats
path: root/tests/dummyresourcetest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-30 13:43:31 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-30 13:43:31 +0200
commit01adeefb24bf72f1015e93aa5f075f93f56d94da (patch)
treeee6d204a47f246688202b4a3a9eb0db23b462f7f /tests/dummyresourcetest.cpp
parent07572b25af45c41a82eb8ddfdecf18e58958788b (diff)
downloadsink-01adeefb24bf72f1015e93aa5f075f93f56d94da.tar.gz
sink-01adeefb24bf72f1015e93aa5f075f93f56d94da.zip
Made the pipeline an implementation detail of the resource.
This removes one dependency from the Listener and will allow us to test the Listener better.
Diffstat (limited to 'tests/dummyresourcetest.cpp')
-rw-r--r--tests/dummyresourcetest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp
index 10cd7e3..1a4d6ca 100644
--- a/tests/dummyresourcetest.cpp
+++ b/tests/dummyresourcetest.cpp
@@ -12,6 +12,7 @@
12#include "commands.h" 12#include "commands.h"
13#include "entitybuffer.h" 13#include "entitybuffer.h"
14#include "resourceconfig.h" 14#include "resourceconfig.h"
15#include "pipeline.h"
15 16
16static void removeFromDisk(const QString &name) 17static void removeFromDisk(const QString &name)
17{ 18{
@@ -133,10 +134,9 @@ private Q_SLOTS:
133 134
134 void testResourceSync() 135 void testResourceSync()
135 { 136 {
136 Akonadi2::Pipeline pipeline("org.kde.dummy.instance1"); 137 auto pipeline = QSharedPointer<Akonadi2::Pipeline>::create("org.kde.dummy.instance1");
137 DummyResource resource("org.kde.dummy.instance1"); 138 DummyResource resource("org.kde.dummy.instance1", pipeline);
138 resource.configurePipeline(&pipeline); 139 auto job = resource.synchronizeWithSource();
139 auto job = resource.synchronizeWithSource(&pipeline);
140 //TODO pass in optional timeout? 140 //TODO pass in optional timeout?
141 auto future = job.exec(); 141 auto future = job.exec();
142 future.waitForFinished(); 142 future.waitForFinished();