Warning, file /pim/mailcommon/src/snippets/autotests/snippetsmanagertest.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-only 0005 */ 0006 0007 #include "snippetsmanagertest.h" 0008 #include "../snippetsmanager.h" 0009 #include <KActionCollection> 0010 #include <QTest> 0011 0012 SnippetsManagerTest::SnippetsManagerTest(QObject *parent) 0013 : QObject(parent) 0014 { 0015 } 0016 0017 SnippetsManagerTest::~SnippetsManagerTest() = default; 0018 0019 void SnippetsManagerTest::shouldHaveDefaultValue() 0020 { 0021 auto collection = new KActionCollection(this); 0022 MailCommon::SnippetsManager snippetManager(collection, this); 0023 QVERIFY(snippetManager.deleteSnippetAction()); 0024 QVERIFY(snippetManager.model()); 0025 QVERIFY(snippetManager.selectionModel()); 0026 QVERIFY(snippetManager.addSnippetAction()); 0027 QVERIFY(snippetManager.editSnippetAction()); 0028 QVERIFY(snippetManager.deleteSnippetAction()); 0029 QVERIFY(snippetManager.addSnippetGroupAction()); 0030 QVERIFY(snippetManager.editSnippetGroupAction()); 0031 QVERIFY(snippetManager.deleteSnippetGroupAction()); 0032 QVERIFY(snippetManager.insertSnippetAction()); 0033 QVERIFY(snippetManager.selectedName().isEmpty()); 0034 } 0035 0036 QTEST_MAIN(SnippetsManagerTest) 0037 0038 #include "moc_snippetsmanagertest.cpp"