Commit 79c09d44 authored by Laurent Montel's avatar Laurent Montel 😁

Add new unittest

parent 1386a54a
...@@ -30,6 +30,7 @@ macro(add_templateparser_unittest _source) ...@@ -30,6 +30,7 @@ macro(add_templateparser_unittest _source)
endmacro() endmacro()
add_templateparser_unittest(templateparsertest.cpp) add_templateparser_unittest(templateparsertest.cpp)
add_templateparser_unittest(customtemplatesmenutest.cpp)
kde4_handle_crypto_rpath_for_executable( templateparsertest ) kde4_handle_crypto_rpath_for_executable( templateparsertest )
......
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "customtemplatesmenutest.h"
#include "../customtemplatesmenu.h"
#include <kactioncollection.h>
#include <qtest_kde.h>
CustomTemplatesMenuTest::CustomTemplatesMenuTest(QObject *parent)
: QObject(parent)
{
}
CustomTemplatesMenuTest::~CustomTemplatesMenuTest()
{
}
void CustomTemplatesMenuTest::shouldHaveDefaultValue()
{
KActionCollection *collection = new KActionCollection(this);
TemplateParser::CustomTemplatesMenu templateMenu(0, collection);
QVERIFY(templateMenu.replyActionMenu());
QVERIFY(templateMenu.replyAllActionMenu());
QVERIFY(templateMenu.forwardActionMenu());
}
QTEST_KDEMAIN(CustomTemplatesMenuTest, GUI)
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef CUSTOMTEMPLATESMENUTEST_H
#define CUSTOMTEMPLATESMENUTEST_H
#include <QObject>
class CustomTemplatesMenuTest : public QObject
{
Q_OBJECT
public:
explicit CustomTemplatesMenuTest(QObject *parent = 0);
~CustomTemplatesMenuTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // CUSTOMTEMPLATESMENUTEST_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment