summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-06-13 08:54:14 +0200
committerMontel Laurent <[email protected]>2017-06-13 08:54:14 +0200
commite146a7541aae32e3121ad8c938ac5d4f06d8967d (patch)
treebb958d7d0b27714bddefc5aff5608f5171189a9c
parent69da21851f1bda8777c001137df20d1e092b63d8 (diff)
implement autotest
-rw-r--r--plugins/templateparser/autotests/CMakeLists.txt10
-rw-r--r--plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.cpp6
-rw-r--r--plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.h21
3 files changed, 33 insertions, 4 deletions
diff --git a/plugins/templateparser/autotests/CMakeLists.txt b/plugins/templateparser/autotests/CMakeLists.txt
index f9f421b..6f030cc 100644
--- a/plugins/templateparser/autotests/CMakeLists.txt
+++ b/plugins/templateparser/autotests/CMakeLists.txt
@@ -1,12 +1,14 @@
-macro(add_templateparserplugin_unittest _source)
- set(_test ${_source})
+macro(add_templateparserplugin_unittest _source _extrasources)
+ set(_test ${_source} ${_extrasources})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
- ecm_mark_as_test(templateparser-${_name})
+ ecm_mark_as_test(templateparserplugin-${_name})
target_link_libraries(${_name}
+ KF5::MessageViewer
KF5::TemplateParser
+ KF5::AkonadiContact
Qt5::Test
)
endmacro()
-add_templateparserplugin_unittest(templateparseremailaddressrequesterakonaditest.cpp)
+add_templateparserplugin_unittest(templateparseremailaddressrequesterakonaditest.cpp "../templateparseremailaddressrequesterakonadi.cpp")
diff --git a/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.cpp b/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.cpp
index 429d4d8..44c157e 100644
--- a/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.cpp
+++ b/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.cpp
@@ -18,6 +18,7 @@
*/
#include "templateparseremailaddressrequesterakonaditest.h"
+#include "../templateparseremailaddressrequesterakonadi.h"
#include <QTest>
TemplateParserEmailAddressRequesterAkonadiTest::TemplateParserEmailAddressRequesterAkonadiTest(QObject *parent)
@@ -26,5 +27,10 @@ TemplateParserEmailAddressRequesterAkonadiTest::TemplateParserEmailAddressReques
}
+void TemplateParserEmailAddressRequesterAkonadiTest::shouldHaveDefaultValues()
+{
+ TemplateParserEmailAddressRequesterAkonadi w;
+}
+
QTEST_MAIN(TemplateParserEmailAddressRequesterAkonadiTest)
diff --git a/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.h b/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.h
index 17212f6..a949db4 100644
--- a/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.h
+++ b/plugins/templateparser/autotests/templateparseremailaddressrequesterakonaditest.h
@@ -1,3 +1,22 @@
+/*
+ Copyright (C) 2017 Montel Laurent <[email protected]>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ 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; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
#ifndef TEMPLATEPARSEREMAILADDRESSREQUESTERAKONADITEST_H
#define TEMPLATEPARSEREMAILADDRESSREQUESTERAKONADITEST_H
@@ -10,6 +29,8 @@ public:
explicit TemplateParserEmailAddressRequesterAkonadiTest(QObject *parent = nullptr);
~TemplateParserEmailAddressRequesterAkonadiTest() = default;
+private Q_SLOTS:
+ void shouldHaveDefaultValues();
};
#endif // TEMPLATEPARSEREMAILADDRESSREQUESTERAKONADITEST_H