diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-13 00:04:05 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-13 00:04:05 +0200 |
commit | 2eb3810b66de3130f3e650627380c28a96acded7 (patch) | |
tree | 947716efcdfc0be52958e8659defbc19db9e6b6d /tests/genericfacadebenchmark.cpp | |
parent | 1b39c149e1fe8705f7fcbd8840de85414c652dc1 (diff) | |
download | sink-2eb3810b66de3130f3e650627380c28a96acded7.tar.gz sink-2eb3810b66de3130f3e650627380c28a96acded7.zip |
Moved test implementations to central location.
Diffstat (limited to 'tests/genericfacadebenchmark.cpp')
-rw-r--r-- | tests/genericfacadebenchmark.cpp | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/tests/genericfacadebenchmark.cpp b/tests/genericfacadebenchmark.cpp index 7cd6c75..3e98fce 100644 --- a/tests/genericfacadebenchmark.cpp +++ b/tests/genericfacadebenchmark.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | #include <QString> | 3 | #include <QString> |
4 | 4 | ||
5 | #include "testimplementations.h" | ||
6 | |||
5 | #include <common/facade.h> | 7 | #include <common/facade.h> |
6 | #include <common/domainadaptor.h> | 8 | #include <common/domainadaptor.h> |
7 | #include <common/resultprovider.h> | 9 | #include <common/resultprovider.h> |
@@ -9,44 +11,7 @@ | |||
9 | 11 | ||
10 | #include "event_generated.h" | 12 | #include "event_generated.h" |
11 | 13 | ||
12 | class TestEventAdaptorFactory : public DomainTypeAdaptorFactory<Akonadi2::ApplicationDomain::Event, Akonadi2::ApplicationDomain::Buffer::Event, Akonadi2::ApplicationDomain::Buffer::EventBuilder> | ||
13 | { | ||
14 | public: | ||
15 | TestEventAdaptorFactory() | ||
16 | : DomainTypeAdaptorFactory() | ||
17 | { | ||
18 | } | ||
19 | |||
20 | virtual ~TestEventAdaptorFactory() {}; | ||
21 | }; | ||
22 | |||
23 | class TestResourceAccess : public Akonadi2::ResourceAccessInterface | ||
24 | { | ||
25 | Q_OBJECT | ||
26 | public: | ||
27 | virtual ~TestResourceAccess() {}; | ||
28 | KAsync::Job<void> sendCommand(int commandId) Q_DECL_OVERRIDE { return KAsync::null<void>(); } | ||
29 | KAsync::Job<void> sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE { return KAsync::null<void>(); } | ||
30 | KAsync::Job<void> synchronizeResource(bool remoteSync, bool localSync) Q_DECL_OVERRIDE { return KAsync::null<void>(); } | ||
31 | |||
32 | public Q_SLOTS: | ||
33 | void open() Q_DECL_OVERRIDE {} | ||
34 | void close() Q_DECL_OVERRIDE {} | ||
35 | }; | ||
36 | |||
37 | class TestResourceFacade : public Akonadi2::GenericFacade<Akonadi2::ApplicationDomain::Event> | ||
38 | { | ||
39 | public: | ||
40 | TestResourceFacade(const QByteArray &instanceIdentifier, const QSharedPointer<EntityStorage<Akonadi2::ApplicationDomain::Event> > storage, const QSharedPointer<Akonadi2::ResourceAccessInterface> resourceAccess) | ||
41 | : Akonadi2::GenericFacade<Akonadi2::ApplicationDomain::Event>(instanceIdentifier, QSharedPointer<TestEventAdaptorFactory>::create(), storage, resourceAccess) | ||
42 | { | ||
43 | 14 | ||
44 | } | ||
45 | virtual ~TestResourceFacade() | ||
46 | { | ||
47 | |||
48 | } | ||
49 | }; | ||
50 | 15 | ||
51 | class GenericFacadeBenchmark : public QObject | 16 | class GenericFacadeBenchmark : public QObject |
52 | { | 17 | { |