summaryrefslogtreecommitdiffstats
path: root/tests/pipelinetest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pipelinetest.cpp')
-rw-r--r--tests/pipelinetest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/pipelinetest.cpp b/tests/pipelinetest.cpp
index 9290050..6ea2041 100644
--- a/tests/pipelinetest.cpp
+++ b/tests/pipelinetest.cpp
@@ -19,6 +19,7 @@
19#include "log.h" 19#include "log.h"
20#include "domainadaptor.h" 20#include "domainadaptor.h"
21#include "definitions.h" 21#include "definitions.h"
22#include "adaptorfactoryregistry.h"
22 23
23static void removeFromDisk(const QString &name) 24static void removeFromDisk(const QString &name)
24{ 25{
@@ -185,6 +186,7 @@ private slots:
185 void initTestCase() 186 void initTestCase()
186 { 187 {
187 Sink::Log::setDebugOutputLevel(Sink::Log::Trace); 188 Sink::Log::setDebugOutputLevel(Sink::Log::Trace);
189 Sink::AdaptorFactoryRegistry::instance().registerFactory<Sink::ApplicationDomain::Event, TestEventAdaptorFactory>("test");
188 } 190 }
189 191
190 void init() 192 void init()
@@ -198,9 +200,7 @@ private slots:
198 auto command = createEntityCommand(createEvent(entityFbb)); 200 auto command = createEntityCommand(createEvent(entityFbb));
199 201
200 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1"); 202 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1");
201 203 pipeline.setResourceType("test");
202 auto adaptorFactory = QSharedPointer<TestEventAdaptorFactory>::create();
203 pipeline.setAdaptorFactory("event", adaptorFactory);
204 204
205 pipeline.startTransaction(); 205 pipeline.startTransaction();
206 pipeline.newEntity(command.constData(), command.size()); 206 pipeline.newEntity(command.constData(), command.size());
@@ -216,9 +216,9 @@ private slots:
216 auto command = createEntityCommand(createEvent(entityFbb, "summary", "description")); 216 auto command = createEntityCommand(createEvent(entityFbb, "summary", "description"));
217 217
218 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1"); 218 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1");
219 pipeline.setResourceType("test");
219 220
220 auto adaptorFactory = QSharedPointer<TestEventAdaptorFactory>::create(); 221 auto adaptorFactory = QSharedPointer<TestEventAdaptorFactory>::create();
221 pipeline.setAdaptorFactory("event", adaptorFactory);
222 222
223 // Create the initial revision 223 // Create the initial revision
224 pipeline.startTransaction(); 224 pipeline.startTransaction();
@@ -265,9 +265,9 @@ private slots:
265 auto command = createEntityCommand(createEvent(entityFbb)); 265 auto command = createEntityCommand(createEvent(entityFbb));
266 266
267 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1"); 267 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1");
268 pipeline.setResourceType("test");
268 269
269 auto adaptorFactory = QSharedPointer<TestEventAdaptorFactory>::create(); 270 auto adaptorFactory = QSharedPointer<TestEventAdaptorFactory>::create();
270 pipeline.setAdaptorFactory("event", adaptorFactory);
271 271
272 // Create the initial revision 272 // Create the initial revision
273 pipeline.startTransaction(); 273 pipeline.startTransaction();
@@ -309,7 +309,7 @@ private slots:
309 flatbuffers::FlatBufferBuilder entityFbb; 309 flatbuffers::FlatBufferBuilder entityFbb;
310 auto command = createEntityCommand(createEvent(entityFbb)); 310 auto command = createEntityCommand(createEvent(entityFbb));
311 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1"); 311 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1");
312 pipeline.setAdaptorFactory("event", QSharedPointer<TestEventAdaptorFactory>::create()); 312 pipeline.setResourceType("test");
313 313
314 // Create the initial revision 314 // Create the initial revision
315 pipeline.startTransaction(); 315 pipeline.startTransaction();
@@ -346,9 +346,9 @@ private slots:
346 TestProcessor testProcessor; 346 TestProcessor testProcessor;
347 347
348 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1"); 348 Sink::Pipeline pipeline("org.kde.pipelinetest.instance1");
349 pipeline.setResourceType("test");
349 pipeline.setPreprocessors("event", QVector<Sink::Preprocessor *>() << &testProcessor); 350 pipeline.setPreprocessors("event", QVector<Sink::Preprocessor *>() << &testProcessor);
350 pipeline.startTransaction(); 351 pipeline.startTransaction();
351 pipeline.setAdaptorFactory("event", QSharedPointer<TestEventAdaptorFactory>::create());
352 352
353 // Actual test 353 // Actual test
354 { 354 {