Git commit 5059f9f3e37e3cfba635995989b7c1e4a638ae9a by Montel Laurent. Committed on 31/03/2015 at 21:01. Pushed by mlaurent into branch 'KDE/4.14'. Add more unittest A +33 -0 mailcommon/filter/autotests/filteractionredirecttest.cpp = [License: GPL (v2)] A +32 -0 mailcommon/filter/autotests/filteractionredirecttest.h [= License: GPL (v2)] A +39 -0 mailcommon/filter/autotests/filteractionunsetstatustest.cpp = [License: GPL (v2)] A +33 -0 mailcommon/filter/autotests/filteractionunsetstatustest.h = [License: GPL (v2)] M +0 -1 mailcommon/filter/filteractions/filteractionreplyto.cpp http://commits.kde.org/kdepim/5059f9f3e37e3cfba635995989b7c1e4a638ae9a diff --git a/mailcommon/filter/autotests/filteractionredirecttest.cpp b/mai= lcommon/filter/autotests/filteractionredirecttest.cpp new file mode 100644 index 0000000..5f9b1eb --- /dev/null +++ b/mailcommon/filter/autotests/filteractionredirecttest.cpp @@ -0,0 +1,33 @@ +/* + 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 "filteractionredirecttest.h" +#include "../filteractions/filteractionredirect.h" +#include + +FilterActionRedirectTest::FilterActionRedirectTest(QObject *parent) + : QObject(parent) +{ + +} + +FilterActionRedirectTest::~FilterActionRedirectTest() +{ + +} + +QTEST_KDEMAIN(FilterActionRedirectTest, GUI) diff --git a/mailcommon/filter/autotests/filteractionredirecttest.h b/mailc= ommon/filter/autotests/filteractionredirecttest.h new file mode 100644 index 0000000..b74f7f0 --- /dev/null +++ b/mailcommon/filter/autotests/filteractionredirecttest.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 FILTERACTIONREDIRECTTEST_H +#define FILTERACTIONREDIRECTTEST_H + +#include + +class FilterActionRedirectTest : public QObject +{ + Q_OBJECT +public: + explicit FilterActionRedirectTest(QObject *parent =3D 0); + ~FilterActionRedirectTest(); + +}; + +#endif // FILTERACTIONREDIRECTTEST_H diff --git a/mailcommon/filter/autotests/filteractionunsetstatustest.cpp b/= mailcommon/filter/autotests/filteractionunsetstatustest.cpp new file mode 100644 index 0000000..c5a86a9 --- /dev/null +++ b/mailcommon/filter/autotests/filteractionunsetstatustest.cpp @@ -0,0 +1,39 @@ +/* + 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 "filteractionunsetstatustest.h" +#include "../filteractions/filteractionunsetstatus.h" +#include + +FilterActionUnsetStatusTest::FilterActionUnsetStatusTest(QObject *parent) + : QObject(parent) +{ + +} + +FilterActionUnsetStatusTest::~FilterActionUnsetStatusTest() +{ + +} + +void FilterActionUnsetStatusTest::shouldHaveSieveRequires() +{ + MailCommon::FilterActionUnsetStatus filter; + QCOMPARE(filter.sieveRequires(), QStringList() << QLatin1String("imap4= flags")); +} + +QTEST_KDEMAIN(FilterActionUnsetStatusTest, GUI) diff --git a/mailcommon/filter/autotests/filteractionunsetstatustest.h b/ma= ilcommon/filter/autotests/filteractionunsetstatustest.h new file mode 100644 index 0000000..4c71220 --- /dev/null +++ b/mailcommon/filter/autotests/filteractionunsetstatustest.h @@ -0,0 +1,33 @@ +/* + 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 FILTERACTIONUNSETSTATUSTEST_H +#define FILTERACTIONUNSETSTATUSTEST_H + +#include + +class FilterActionUnsetStatusTest : public QObject +{ + Q_OBJECT +public: + explicit FilterActionUnsetStatusTest(QObject *parent =3D 0); + ~FilterActionUnsetStatusTest(); +private Q_SLOTS: + void shouldHaveSieveRequires(); +}; + +#endif // FILTERACTIONUNSETSTATUSTEST_H diff --git a/mailcommon/filter/filteractions/filteractionreplyto.cpp b/mail= common/filter/filteractions/filteractionreplyto.cpp index ab31ad7..83b1cea 100644 --- a/mailcommon/filter/filteractions/filteractionreplyto.cpp +++ b/mailcommon/filter/filteractions/filteractionreplyto.cpp @@ -31,7 +31,6 @@ FilterAction* FilterActionReplyTo::newAction() FilterActionReplyTo::FilterActionReplyTo( QObject *parent ) : FilterActionWithAddress( QLatin1String("set Reply-To"), i18n( "Set R= eply-To To" ), parent ) { - mParameter.clear(); } = FilterAction::ReturnCode FilterActionReplyTo::process(ItemContext &context= , bool) const