[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim/KDE/4.14] mailcommon/filter: Add more unittest
From: Montel Laurent <montel () kde ! org>
Date: 2015-03-31 21:02:10
Message-ID: E1Yd3IY-0007sd-7l () scm ! kde ! org
[Download RAW message or body]
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/mailcommon/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 <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, 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 <qtest_kde.h>
+
+FilterActionRedirectTest::FilterActionRedirectTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+FilterActionRedirectTest::~FilterActionRedirectTest()
+{
+
+}
+
+QTEST_KDEMAIN(FilterActionRedirectTest, GUI)
diff --git a/mailcommon/filter/autotests/filteractionredirecttest.h \
b/mailcommon/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 <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, 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 <QObject>
+
+class FilterActionRedirectTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit FilterActionRedirectTest(QObject *parent = 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 <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, 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 <qtest_kde.h>
+
+FilterActionUnsetStatusTest::FilterActionUnsetStatusTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+FilterActionUnsetStatusTest::~FilterActionUnsetStatusTest()
+{
+
+}
+
+void FilterActionUnsetStatusTest::shouldHaveSieveRequires()
+{
+ MailCommon::FilterActionUnsetStatus filter;
+ QCOMPARE(filter.sieveRequires(), QStringList() << QLatin1String("imap4flags"));
+}
+
+QTEST_KDEMAIN(FilterActionUnsetStatusTest, GUI)
diff --git a/mailcommon/filter/autotests/filteractionunsetstatustest.h \
b/mailcommon/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 <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, 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 <QObject>
+
+class FilterActionUnsetStatusTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit FilterActionUnsetStatusTest(QObject *parent = 0);
+ ~FilterActionUnsetStatusTest();
+private Q_SLOTS:
+ void shouldHaveSieveRequires();
+};
+
+#endif // FILTERACTIONUNSETSTATUSTEST_H
diff --git a/mailcommon/filter/filteractions/filteractionreplyto.cpp \
b/mailcommon/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 Reply-To \
To" ), parent ) {
- mParameter.clear();
}
FilterAction::ReturnCode FilterActionReplyTo::process(ItemContext &context , bool) \
const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic