Commit e146a754 authored by Laurent Montel's avatar Laurent Montel 😁

implement autotest

parent 69da2185
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")
......@@ -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)
/*
Copyright (C) 2017 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 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
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