File indexing completed on 2025-01-05 04:59:54
0001 /* 0002 * SPDX-FileCopyrightText: 2014-2015 Kevin Ottens <ervin@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 0006 0007 #include <testlib/qtest_zanshin.h> 0008 0009 #include <testlib/akonadistoragetestbase.h> 0010 #include <testlib/testsafety.h> 0011 0012 #include "akonadi/akonadimonitorimpl.h" 0013 #include "akonadi/akonadistorage.h" 0014 0015 class AkonadiStorageTest : public Testlib::AkonadiStorageTestBase 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit AkonadiStorageTest(QObject *parent = nullptr) 0020 : AkonadiStorageTestBase(parent) 0021 { 0022 } 0023 0024 Akonadi::StorageInterface::Ptr createStorage() override 0025 { 0026 return Akonadi::StorageInterface::Ptr(new Akonadi::Storage); 0027 } 0028 0029 Akonadi::MonitorInterface::Ptr createMonitor() override 0030 { 0031 Akonadi::MonitorInterface::Ptr ptr(new Akonadi::MonitorImpl); 0032 QTest::qWait(10); // give Monitor time to upload settings 0033 return ptr; 0034 } 0035 0036 private slots: 0037 void initTestCase() 0038 { 0039 QVERIFY(TestLib::TestSafety::checkTestIsIsolated()); 0040 } 0041 }; 0042 0043 ZANSHIN_TEST_MAIN(AkonadiStorageTest) 0044 0045 #include "akonadistoragetest.moc"