File indexing completed on 2025-01-05 04:49:32
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #include "akonadidatabasetoolswidgettest.h" 0007 #include "akonadidatabasetoolswidget.h" 0008 #include <QPlainTextEdit> 0009 #include <QTest> 0010 #include <QVBoxLayout> 0011 QTEST_MAIN(AkonadiDatabaseToolsWidgetTest) 0012 AkonadiDatabaseToolsWidgetTest::AkonadiDatabaseToolsWidgetTest(QObject *parent) 0013 : QObject{parent} 0014 { 0015 } 0016 0017 void AkonadiDatabaseToolsWidgetTest::shouldHaveDefaultValues() 0018 { 0019 AkonadiDatabaseToolsWidget w; 0020 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0021 QVERIFY(mainLayout); 0022 QCOMPARE(mainLayout->contentsMargins(), QMargins{}); 0023 0024 auto mPlainTextEdit = w.findChild<QPlainTextEdit *>(QStringLiteral("mPlainTextEdit")); 0025 QVERIFY(mPlainTextEdit); 0026 QVERIFY(mPlainTextEdit->toPlainText().isEmpty()); 0027 QVERIFY(mPlainTextEdit->isReadOnly()); 0028 } 0029 0030 #include "moc_akonadidatabasetoolswidgettest.cpp"