File indexing completed on 2025-01-05 04:59:59

0001 /*
0002  * SPDX-FileCopyrightText: 2014 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 "domain/datasource.h"
0010 #include "domain/task.h"
0011 
0012 #include "presentation/metatypes.h"
0013 
0014 class MetaTypesTest : public QObject
0015 {
0016     Q_OBJECT
0017 private slots:
0018     void shouldRegisterMetaTypes()
0019     {
0020         // GIVEN
0021 
0022         // WHEN
0023         Presentation::MetaTypes::registerAll();
0024 
0025         // THEN
0026         QVERIFY(QMetaType::isRegistered(qMetaTypeId<QAbstractItemModel*>()));
0027         QVERIFY(QMetaType::isRegistered(qMetaTypeId<QObjectPtr>()));
0028         QVERIFY(QMetaType::isRegistered(qMetaTypeId<Domain::Task::Ptr>()));
0029         QVERIFY(QMetaType::isRegistered(qMetaTypeId<Domain::DataSource::Ptr>()));
0030     }
0031 };
0032 
0033 ZANSHIN_TEST_MAIN(MetaTypesTest)
0034 
0035 #include "metatypestest.moc"