diff options
Diffstat (limited to 'tests/dummyresourcetest.cpp')
-rw-r--r-- | tests/dummyresourcetest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index be6e3a5..0883a13 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "log.h" | 13 | #include "log.h" |
14 | #include "test.h" | 14 | #include "test.h" |
15 | #include "testutils.h" | 15 | #include "testutils.h" |
16 | #include "adaptorfactoryregistry.h" | ||
16 | 17 | ||
17 | using namespace Sink; | 18 | using namespace Sink; |
18 | using namespace Sink::ApplicationDomain; | 19 | using namespace Sink::ApplicationDomain; |
@@ -28,6 +29,11 @@ class DummyResourceTest : public QObject | |||
28 | 29 | ||
29 | QTime time; | 30 | QTime time; |
30 | 31 | ||
32 | Sink::ResourceContext getContext() | ||
33 | { | ||
34 | return Sink::ResourceContext{"sink.dummy.instance1", "sink.dummy", Sink::AdaptorFactoryRegistry::instance().getFactories("sink.dummy")}; | ||
35 | } | ||
36 | |||
31 | private slots: | 37 | private slots: |
32 | void initTestCase() | 38 | void initTestCase() |
33 | { | 39 | { |
@@ -129,8 +135,7 @@ private slots: | |||
129 | 135 | ||
130 | void testResourceSync() | 136 | void testResourceSync() |
131 | { | 137 | { |
132 | auto pipeline = QSharedPointer<Sink::Pipeline>::create("sink.dummy.instance1"); | 138 | ::DummyResource resource(getContext()); |
133 | ::DummyResource resource("sink.dummy.instance1", pipeline); | ||
134 | auto job = resource.synchronizeWithSource(); | 139 | auto job = resource.synchronizeWithSource(); |
135 | // TODO pass in optional timeout? | 140 | // TODO pass in optional timeout? |
136 | auto future = job.exec(); | 141 | auto future = job.exec(); |