diff options
Diffstat (limited to 'tests/inspectiontest.cpp')
-rw-r--r-- | tests/inspectiontest.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/tests/inspectiontest.cpp b/tests/inspectiontest.cpp index c876aa9..79e5863 100644 --- a/tests/inspectiontest.cpp +++ b/tests/inspectiontest.cpp | |||
@@ -3,7 +3,8 @@ | |||
3 | #include <QString> | 3 | #include <QString> |
4 | 4 | ||
5 | #include "dummyresource/resourcefactory.h" | 5 | #include "dummyresource/resourcefactory.h" |
6 | #include "clientapi.h" | 6 | #include "store.h" |
7 | #include "resourcecontrol.h" | ||
7 | #include "resourceconfig.h" | 8 | #include "resourceconfig.h" |
8 | #include "log.h" | 9 | #include "log.h" |
9 | 10 | ||
@@ -21,17 +22,8 @@ private Q_SLOTS: | |||
21 | Sink::Log::setDebugOutputLevel(Sink::Log::Trace); | 22 | Sink::Log::setDebugOutputLevel(Sink::Log::Trace); |
22 | auto factory = Sink::ResourceFactory::load("org.kde.dummy"); | 23 | auto factory = Sink::ResourceFactory::load("org.kde.dummy"); |
23 | QVERIFY(factory); | 24 | QVERIFY(factory); |
24 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); | ||
25 | ResourceConfig::addResource("org.kde.dummy.instance1", "org.kde.dummy"); | 25 | ResourceConfig::addResource("org.kde.dummy.instance1", "org.kde.dummy"); |
26 | } | 26 | Sink::Store::removeDataFromDisk(QByteArray("org.kde.dummy.instance1")).exec().waitForFinished(); |
27 | |||
28 | void cleanup() | ||
29 | { | ||
30 | Sink::Store::shutdown(QByteArray("org.kde.dummy.instance1")).exec().waitForFinished(); | ||
31 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); | ||
32 | auto factory = Sink::ResourceFactory::load("org.kde.dummy"); | ||
33 | QVERIFY(factory); | ||
34 | Sink::Store::start(QByteArray("org.kde.dummy.instance1")).exec().waitForFinished(); | ||
35 | } | 27 | } |
36 | 28 | ||
37 | void testInspection_data() | 29 | void testInspection_data() |
@@ -50,8 +42,8 @@ private Q_SLOTS: | |||
50 | Mail mail(QByteArray("org.kde.dummy.instance1"), QByteArray("identifier"), 0, QSharedPointer<MemoryBufferAdaptor::MemoryBufferAdaptor>::create()); | 42 | Mail mail(QByteArray("org.kde.dummy.instance1"), QByteArray("identifier"), 0, QSharedPointer<MemoryBufferAdaptor::MemoryBufferAdaptor>::create()); |
51 | 43 | ||
52 | //testInspection is a magic property that the dummyresource supports | 44 | //testInspection is a magic property that the dummyresource supports |
53 | auto inspectionCommand = Resources::Inspection::PropertyInspection(mail, "testInspection", success); | 45 | auto inspectionCommand = ResourceControl::Inspection::PropertyInspection(mail, "testInspection", success); |
54 | auto result = Resources::inspect<Mail>(inspectionCommand).exec(); | 46 | auto result = ResourceControl::inspect<Mail>(inspectionCommand).exec(); |
55 | result.waitForFinished(); | 47 | result.waitForFinished(); |
56 | if (success) { | 48 | if (success) { |
57 | QVERIFY(!result.errorCode()); | 49 | QVERIFY(!result.errorCode()); |