diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-11-15 12:46:26 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-11-15 12:46:26 +0100 |
commit | 972f3a4e96876e4c36162a11062e40863d88a2a1 (patch) | |
tree | e5173c26f35895e8f3386822d47b7b0d93374db5 /tests/testimplementations.h | |
parent | d4b10a3de396eebc6c815093e9e1725ece270e9e (diff) | |
download | sink-972f3a4e96876e4c36162a11062e40863d88a2a1.tar.gz sink-972f3a4e96876e4c36162a11062e40863d88a2a1.zip |
Cleanup
Diffstat (limited to 'tests/testimplementations.h')
-rw-r--r-- | tests/testimplementations.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/testimplementations.h b/tests/testimplementations.h index 1436c68..c371456 100644 --- a/tests/testimplementations.h +++ b/tests/testimplementations.h | |||
@@ -21,13 +21,11 @@ | |||
21 | 21 | ||
22 | #include <Async/Async> | 22 | #include <Async/Async> |
23 | 23 | ||
24 | #include <common/entitystorage.h> | ||
25 | #include <common/domainadaptor.h> | 24 | #include <common/domainadaptor.h> |
26 | #include <common/resultprovider.h> | 25 | #include <common/resultprovider.h> |
27 | #include <common/synclistresult.h> | 26 | #include <common/synclistresult.h> |
28 | #include <common/resourceaccess.h> | 27 | #include <common/resourceaccess.h> |
29 | #include <common/facade.h> | 28 | #include <common/facade.h> |
30 | #include <common/entitystorage.h> | ||
31 | #include <common/genericresource.h> | 29 | #include <common/genericresource.h> |
32 | 30 | ||
33 | //Replace with something different | 31 | //Replace with something different |
@@ -44,30 +42,6 @@ public: | |||
44 | virtual ~TestEventAdaptorFactory() {}; | 42 | virtual ~TestEventAdaptorFactory() {}; |
45 | }; | 43 | }; |
46 | 44 | ||
47 | class TestEntityStorage : public EntityStorage<Akonadi2::ApplicationDomain::Event> | ||
48 | { | ||
49 | public: | ||
50 | using EntityStorage::EntityStorage; | ||
51 | virtual qint64 read(const Akonadi2::Query &query, qint64 oldRevision, const QSharedPointer<Akonadi2::ResultProvider<Akonadi2::ApplicationDomain::Event::Ptr> > &resultProvider) Q_DECL_OVERRIDE | ||
52 | { | ||
53 | for (const auto &res : mResults) { | ||
54 | resultProvider->add(res); | ||
55 | } | ||
56 | for (const auto &res : mModifications) { | ||
57 | resultProvider->modify(res); | ||
58 | } | ||
59 | for (const auto &res : mRemovals) { | ||
60 | resultProvider->remove(res); | ||
61 | } | ||
62 | return mLatestRevision; | ||
63 | } | ||
64 | |||
65 | QList<Akonadi2::ApplicationDomain::Event::Ptr> mResults; | ||
66 | QList<Akonadi2::ApplicationDomain::Event::Ptr> mModifications; | ||
67 | QList<Akonadi2::ApplicationDomain::Event::Ptr> mRemovals; | ||
68 | qint64 mLatestRevision; | ||
69 | }; | ||
70 | |||
71 | class TestResourceAccess : public Akonadi2::ResourceAccessInterface | 45 | class TestResourceAccess : public Akonadi2::ResourceAccessInterface |
72 | { | 46 | { |
73 | Q_OBJECT | 47 | Q_OBJECT |