diff --git a/templateparser/tests/CMakeLists.txt b/templateparser/tests/CMakeLists.txt index ff2c0b00dc776634362539e48a21021a5709e78b..2b04dad4be50741e5c06d79aa222e81e4d14d4f2 100644 --- a/templateparser/tests/CMakeLists.txt +++ b/templateparser/tests/CMakeLists.txt @@ -30,6 +30,7 @@ macro(add_templateparser_unittest _source) endmacro() add_templateparser_unittest(templateparsertest.cpp) +add_templateparser_unittest(customtemplatesmenutest.cpp) kde4_handle_crypto_rpath_for_executable( templateparsertest ) diff --git a/templateparser/tests/customtemplatesmenutest.cpp b/templateparser/tests/customtemplatesmenutest.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f1547f4ada9b73b35b7f8748fbe55e8cef85f0fb --- /dev/null +++ b/templateparser/tests/customtemplatesmenutest.cpp @@ -0,0 +1,44 @@ +/* + Copyright (c) 2015 Montel Laurent + + 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 +#include + +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) diff --git a/templateparser/tests/customtemplatesmenutest.h b/templateparser/tests/customtemplatesmenutest.h new file mode 100644 index 0000000000000000000000000000000000000000..ce50ed4f025acc7ec551be8482f4d795aab7c15e --- /dev/null +++ b/templateparser/tests/customtemplatesmenutest.h @@ -0,0 +1,34 @@ +/* + Copyright (c) 2015 Montel Laurent + + 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 + +class CustomTemplatesMenuTest : public QObject +{ + Q_OBJECT +public: + explicit CustomTemplatesMenuTest(QObject *parent = 0); + ~CustomTemplatesMenuTest(); + +private Q_SLOTS: + void shouldHaveDefaultValue(); +}; + +#endif // CUSTOMTEMPLATESMENUTEST_H