File indexing completed on 2024-11-24 04:43:02
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "mergecontactselectlistwidgettest.h" 0008 #include "job/mergecontacts.h" 0009 #include "widgets/mergecontactselectlistwidget.h" 0010 #include <QLabel> 0011 #include <QListWidget> 0012 #include <QTest> 0013 0014 MergeContactSelectListWidgetTest::MergeContactSelectListWidgetTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 } 0018 0019 MergeContactSelectListWidgetTest::~MergeContactSelectListWidgetTest() = default; 0020 0021 void MergeContactSelectListWidgetTest::shouldHaveDefaultValue() 0022 { 0023 KABMergeContacts::MergeContactSelectListWidget selectListWidget; 0024 0025 auto title = selectListWidget.findChild<QLabel *>(QStringLiteral("title")); 0026 QVERIFY(title); 0027 auto listWidget = selectListWidget.findChild<QListWidget *>(QStringLiteral("listwidget")); 0028 QVERIFY(listWidget); 0029 QCOMPARE(selectListWidget.selectedContact(), -1); 0030 QCOMPARE(selectListWidget.conflictType(), KABMergeContacts::MergeContacts::None); 0031 } 0032 0033 QTEST_MAIN(MergeContactSelectListWidgetTest) 0034 0035 #include "moc_mergecontactselectlistwidgettest.cpp"