diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-09 15:21:06 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-09 15:21:06 +0200 |
commit | cc3fed3668a80616ec78bc872e21b7ac06bcde38 (patch) | |
tree | ab4888ae0050e5b56f59662dd356523b3a421043 /tests/dummyresourcetest.cpp | |
parent | c4e098fae7340d6d73cd4fbe880440baca1ddd49 (diff) | |
download | sink-cc3fed3668a80616ec78bc872e21b7ac06bcde38.tar.gz sink-cc3fed3668a80616ec78bc872e21b7ac06bcde38.zip |
Renamed Akonadi::Domain to Akonadi::ApplicationDomain
Because it's really the application domain and not the akonadi domain.
Diffstat (limited to 'tests/dummyresourcetest.cpp')
-rw-r--r-- | tests/dummyresourcetest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index b185664..5fed7cd 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp | |||
@@ -49,26 +49,26 @@ private Q_SLOTS: | |||
49 | eventFbb.Clear(); | 49 | eventFbb.Clear(); |
50 | { | 50 | { |
51 | auto summary = eventFbb.CreateString("summary"); | 51 | auto summary = eventFbb.CreateString("summary"); |
52 | Akonadi2::Domain::Buffer::EventBuilder eventBuilder(eventFbb); | 52 | Akonadi2::ApplicationDomain::Buffer::EventBuilder eventBuilder(eventFbb); |
53 | eventBuilder.add_summary(summary); | 53 | eventBuilder.add_summary(summary); |
54 | auto eventLocation = eventBuilder.Finish(); | 54 | auto eventLocation = eventBuilder.Finish(); |
55 | Akonadi2::Domain::Buffer::FinishEventBuffer(eventFbb, eventLocation); | 55 | Akonadi2::ApplicationDomain::Buffer::FinishEventBuffer(eventFbb, eventLocation); |
56 | } | 56 | } |
57 | 57 | ||
58 | flatbuffers::FlatBufferBuilder localFbb; | 58 | flatbuffers::FlatBufferBuilder localFbb; |
59 | { | 59 | { |
60 | auto uid = localFbb.CreateString("testuid"); | 60 | auto uid = localFbb.CreateString("testuid"); |
61 | auto localBuilder = Akonadi2::Domain::Buffer::EventBuilder(localFbb); | 61 | auto localBuilder = Akonadi2::ApplicationDomain::Buffer::EventBuilder(localFbb); |
62 | localBuilder.add_uid(uid); | 62 | localBuilder.add_uid(uid); |
63 | auto location = localBuilder.Finish(); | 63 | auto location = localBuilder.Finish(); |
64 | Akonadi2::Domain::Buffer::FinishEventBuffer(localFbb, location); | 64 | Akonadi2::ApplicationDomain::Buffer::FinishEventBuffer(localFbb, location); |
65 | } | 65 | } |
66 | 66 | ||
67 | flatbuffers::FlatBufferBuilder entityFbb; | 67 | flatbuffers::FlatBufferBuilder entityFbb; |
68 | Akonadi2::EntityBuffer::assembleEntityBuffer(entityFbb, 0, 0, eventFbb.GetBufferPointer(), eventFbb.GetSize(), localFbb.GetBufferPointer(), localFbb.GetSize()); | 68 | Akonadi2::EntityBuffer::assembleEntityBuffer(entityFbb, 0, 0, eventFbb.GetBufferPointer(), eventFbb.GetSize(), localFbb.GetBufferPointer(), localFbb.GetSize()); |
69 | 69 | ||
70 | flatbuffers::FlatBufferBuilder fbb; | 70 | flatbuffers::FlatBufferBuilder fbb; |
71 | auto type = fbb.CreateString(Akonadi2::Domain::getTypeName<Akonadi2::Domain::Event>().toStdString().data()); | 71 | auto type = fbb.CreateString(Akonadi2::ApplicationDomain::getTypeName<Akonadi2::ApplicationDomain::Event>().toStdString().data()); |
72 | auto delta = fbb.CreateVector<uint8_t>(entityFbb.GetBufferPointer(), entityFbb.GetSize()); | 72 | auto delta = fbb.CreateVector<uint8_t>(entityFbb.GetBufferPointer(), entityFbb.GetSize()); |
73 | Akonadi2::Commands::CreateEntityBuilder builder(fbb); | 73 | Akonadi2::Commands::CreateEntityBuilder builder(fbb); |
74 | builder.add_domainType(type); | 74 | builder.add_domainType(type); |
@@ -98,18 +98,18 @@ private Q_SLOTS: | |||
98 | 98 | ||
99 | void testProperty() | 99 | void testProperty() |
100 | { | 100 | { |
101 | Akonadi2::Domain::Event event; | 101 | Akonadi2::ApplicationDomain::Event event; |
102 | event.setProperty("uid", "testuid"); | 102 | event.setProperty("uid", "testuid"); |
103 | QCOMPARE(event.getProperty("uid").toByteArray(), QByteArray("testuid")); | 103 | QCOMPARE(event.getProperty("uid").toByteArray(), QByteArray("testuid")); |
104 | } | 104 | } |
105 | 105 | ||
106 | void testWriteToFacadeAndQueryByUid() | 106 | void testWriteToFacadeAndQueryByUid() |
107 | { | 107 | { |
108 | Akonadi2::Domain::Event event; | 108 | Akonadi2::ApplicationDomain::Event event; |
109 | event.setProperty("uid", "testuid"); | 109 | event.setProperty("uid", "testuid"); |
110 | QCOMPARE(event.getProperty("uid").toByteArray(), QByteArray("testuid")); | 110 | QCOMPARE(event.getProperty("uid").toByteArray(), QByteArray("testuid")); |
111 | event.setProperty("summary", "summaryValue"); | 111 | event.setProperty("summary", "summaryValue"); |
112 | Akonadi2::Store::create<Akonadi2::Domain::Event>(event, "org.kde.dummy"); | 112 | Akonadi2::Store::create<Akonadi2::ApplicationDomain::Event>(event, "org.kde.dummy"); |
113 | 113 | ||
114 | Akonadi2::Query query; | 114 | Akonadi2::Query query; |
115 | query.resources << "org.kde.dummy"; | 115 | query.resources << "org.kde.dummy"; |
@@ -117,7 +117,7 @@ private Q_SLOTS: | |||
117 | query.processAll = true; | 117 | query.processAll = true; |
118 | 118 | ||
119 | query.propertyFilter.insert("uid", "testuid"); | 119 | query.propertyFilter.insert("uid", "testuid"); |
120 | async::SyncListResult<Akonadi2::Domain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::Domain::Event>(query)); | 120 | async::SyncListResult<Akonadi2::ApplicationDomain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::ApplicationDomain::Event>(query)); |
121 | result.exec(); | 121 | result.exec(); |
122 | QCOMPARE(result.size(), 1); | 122 | QCOMPARE(result.size(), 1); |
123 | auto value = result.first(); | 123 | auto value = result.first(); |
@@ -147,7 +147,7 @@ private Q_SLOTS: | |||
147 | query.syncOnDemand = true; | 147 | query.syncOnDemand = true; |
148 | query.processAll = true; | 148 | query.processAll = true; |
149 | 149 | ||
150 | async::SyncListResult<Akonadi2::Domain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::Domain::Event>(query)); | 150 | async::SyncListResult<Akonadi2::ApplicationDomain::Event::Ptr> result(Akonadi2::Store::load<Akonadi2::ApplicationDomain::Event>(query)); |
151 | result.exec(); | 151 | result.exec(); |
152 | QVERIFY(!result.isEmpty()); | 152 | QVERIFY(!result.isEmpty()); |
153 | auto value = result.first(); | 153 | auto value = result.first(); |