diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-21 22:20:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-21 22:20:31 +0100 |
commit | d80ff84c28c0be626c1df4528741cddf5a55f547 (patch) | |
tree | dfa1a3771f52970bfaf7b9e56d8675aeabfc65ef /tests | |
parent | d21aa4e35fb96fa3b07888f710cbc3440af8bdd3 (diff) | |
download | sink-d80ff84c28c0be626c1df4528741cddf5a55f547.tar.gz sink-d80ff84c28c0be626c1df4528741cddf5a55f547.zip |
Write-Read loop from clientside.
It's a huge hack but starts to show results.
Most urgently we need:
* reliable command results
* the 3 buffers instead of the 1
* A way to implement storage as preprocessor (or a place to impelement it after the preprocessors).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/dummyresourcetest.cpp | 35 |
2 files changed, 37 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4c288e9..dcf2f21 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -17,7 +17,9 @@ manual_tests ( | |||
17 | storagebenchmark | 17 | storagebenchmark |
18 | storagetest | 18 | storagetest |
19 | dummyresourcefacadetest | 19 | dummyresourcefacadetest |
20 | dummyresourcetest | ||
20 | ) | 21 | ) |
21 | 22 | ||
22 | target_link_libraries(dummyresourcefacadetest akonadi2_resource_dummy) | 23 | target_link_libraries(dummyresourcefacadetest akonadi2_resource_dummy) |
24 | target_link_libraries(dummyresourcetest akonadi2_resource_dummy) | ||
23 | 25 | ||
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp new file mode 100644 index 0000000..75d29de --- /dev/null +++ b/tests/dummyresourcetest.cpp | |||
@@ -0,0 +1,35 @@ | |||
1 | #include <QtTest> | ||
2 | |||
3 | #include <QString> | ||
4 | |||
5 | #include "common/resource.h" | ||
6 | #include "clientapi.h" | ||
7 | |||
8 | class DummyResourceTest : public QObject | ||
9 | { | ||
10 | Q_OBJECT | ||
11 | private Q_SLOTS: | ||
12 | void initTestCase() | ||
13 | { | ||
14 | auto factory = Akonadi2::ResourceFactory::load("org.kde.dummy"); | ||
15 | QVERIFY(factory); | ||
16 | } | ||
17 | |||
18 | void cleanupTestCase() | ||
19 | { | ||
20 | } | ||
21 | |||
22 | void testSync() | ||
23 | { | ||
24 | Akonadi2::Query query; | ||
25 | query.resources << "org.kde.dummy"; | ||
26 | |||
27 | async::SyncListResult<Akonadi2::Domain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::Domain::Event>(query)); | ||
28 | result.exec(); | ||
29 | QVERIFY(!result.isEmpty()); | ||
30 | } | ||
31 | |||
32 | }; | ||
33 | |||
34 | QTEST_MAIN(DummyResourceTest) | ||
35 | #include "dummyresourcetest.moc" | ||