From 228a3380328535f30fcb187cae7db2415ec2d314 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 8 Jul 2015 09:19:43 +0200 Subject: We can add resources. --- tests/clientapitest.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp index a874dd7..e7db0d0 100644 --- a/tests/clientapitest.cpp +++ b/tests/clientapitest.cpp @@ -174,6 +174,24 @@ private Q_SLOTS: QTRY_VERIFY(!facade->capturedResultProvider); } + void resourceManagement() + { + Akonadi2::FacadeFactory::registerStaticFacades(); + Akonadi2::ApplicationDomain::AkonadiResource res; + res.setProperty("identifier", "identifier1"); + res.setProperty("type", "dummyresource"); + + Akonadi2::Store::create(res, "resourceconfig"); + + { + Akonadi2::Query query; + query.resources << "resourceconfig"; + async::SyncListResult result(Akonadi2::Store::load(query)); + result.exec(); + QCOMPARE(result.size(), 1); + } + } + }; QTEST_MAIN(ClientAPITest) -- cgit v1.2.3