Changeset View
Changeset View
Standalone View
Standalone View
tests/units/akonadi/akonadilivequeryintegratortest.cpp
Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Line(s) | 123 | private slots: | |||
---|---|---|---|---|---|
241 | { | 241 | { | ||
242 | // GIVEN | 242 | // GIVEN | ||
243 | AkonadiFakeData data; | 243 | AkonadiFakeData data; | ||
244 | 244 | | |||
245 | // One toplevel collection | 245 | // One toplevel collection | ||
246 | const auto collection = Akonadi::Collection(GenCollection().withId(42).withRootAsParent().withName(QStringLiteral("folder")).withTaskContent()); | 246 | const auto collection = Akonadi::Collection(GenCollection().withId(42).withRootAsParent().withName(QStringLiteral("folder")).withTaskContent()); | ||
247 | data.createCollection(collection); | 247 | data.createCollection(collection); | ||
248 | 248 | | |||
249 | // One context tag which shows in one query not the other | 249 | // One context which shows in one query not the other | ||
250 | data.createItem(GenTodo().withParent(42).withId(42).withUid("ctx-42").asContext().withTitle(QStringLiteral("42-in"))); | 250 | data.createItem(GenTodo().withParent(42).withId(42).withUid("ctx-42").asContext().withTitle(QStringLiteral("42-in"))); | ||
251 | 251 | | |||
252 | auto integrator = createIntegrator(data); | 252 | auto integrator = createIntegrator(data); | ||
253 | auto storage = createStorage(data); | 253 | auto storage = createStorage(data); | ||
254 | 254 | | |||
255 | auto inQuery = Domain::LiveQueryOutput<Domain::Context::Ptr>::Ptr(); | 255 | auto inQuery = Domain::LiveQueryOutput<Domain::Context::Ptr>::Ptr(); | ||
256 | auto exQuery = Domain::LiveQueryOutput<Domain::Context::Ptr>::Ptr(); | 256 | auto exQuery = Domain::LiveQueryOutput<Domain::Context::Ptr>::Ptr(); | ||
257 | auto fetch = [storage, collection] (const Domain::LiveQueryInput<Akonadi::Item>::AddFunction &add) { | 257 | auto fetch = [storage, collection] (const Domain::LiveQueryInput<Akonadi::Item>::AddFunction &add) { | ||
▲ Show 20 Lines • Show All 637 Lines • Show Last 20 Lines |