From 5732c99c1e14e74a08397071832018d94ff367d2 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Thu, 12 Mar 2015 13:56:38 +0100 Subject: [PATCH] Add unittest --- mailmerge/tests/CMakeLists.txt | 2 +- mailmerge/tests/mailmergejobtest.cpp | 31 +++++++++++++++++++++++++++ mailmerge/tests/mailmergejobtest.h | 32 ++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 mailmerge/tests/mailmergejobtest.cpp create mode 100644 mailmerge/tests/mailmergejobtest.h diff --git a/mailmerge/tests/CMakeLists.txt b/mailmerge/tests/CMakeLists.txt index 97f8be2f2..383bbb222 100644 --- a/mailmerge/tests/CMakeLists.txt +++ b/mailmerge/tests/CMakeLists.txt @@ -41,4 +41,4 @@ kmail_mailmerge(addressbookwidgettest.cpp "../widgets/selectattachmentdialog.cpp kmail_mailmerge(csvwidgettest.cpp "../widgets/csvwidget.cpp" "") kmail_mailmerge(mailmergedialogtest.cpp "../mailmergedialog.cpp;../widgets/mailmergewidget.cpp;../widgets/attachmentlistwidget.cpp;../widgets/csvwidget.cpp;../widgets/addressbookwidget.cpp;../widgets/selectattachmentdialog.cpp" "pimcommon") kmail_mailmerge(selectattachmentdialogtest.cpp "../widgets/selectattachmentdialog.cpp" "") - +kmail_mailmerge(mailmergejobtest.cpp "../job/mailmergejob.cpp" "") diff --git a/mailmerge/tests/mailmergejobtest.cpp b/mailmerge/tests/mailmergejobtest.cpp new file mode 100644 index 000000000..cbcea6622 --- /dev/null +++ b/mailmerge/tests/mailmergejobtest.cpp @@ -0,0 +1,31 @@ +/* + 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 "mailmergejobtest.h" +#include +MailMergeJobTest::MailMergeJobTest(QObject *parent) + : QObject(parent) +{ + +} + +MailMergeJobTest::~MailMergeJobTest() +{ + +} + +QTEST_KDEMAIN(MailMergeJobTest, NoGUI) diff --git a/mailmerge/tests/mailmergejobtest.h b/mailmerge/tests/mailmergejobtest.h new file mode 100644 index 000000000..504d62e38 --- /dev/null +++ b/mailmerge/tests/mailmergejobtest.h @@ -0,0 +1,32 @@ +/* + 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 MAILMERGEJOBTEST_H +#define MAILMERGEJOBTEST_H + +#include + +class MailMergeJobTest : public QObject +{ + Q_OBJECT +public: + explicit MailMergeJobTest(QObject *parent = 0); + ~MailMergeJobTest(); +}; + +#endif // MAILMERGEJOBTEST_H