summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-02 12:17:35 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-02 12:17:35 (GMT)
commit79d81ab74493ec7c3eea4b7fd5b1cb9d40587abe (patch)
treef0e9c8855ef17524efb75ee2c7bff6a94c0253a1
parent0557b7fd35111d725f82cdf8a4498c763ced1551 (diff)
Add autotest
-rw-r--r--src/ksieveui/managescriptsjob/autotests/CMakeLists.txt1
-rw-r--r--src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.cpp39
-rw-r--r--src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.h34
3 files changed, 74 insertions, 0 deletions
diff --git a/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt b/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt
index 25d8bfc..baa196f 100644
--- a/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt
+++ b/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt
@@ -12,5 +12,6 @@ endmacro()
add_managesievejob_test( parseuserjobtest.cpp )
add_managesievejob_test( renamescriptjobtest.cpp )
+add_managesievejob_test( checkscriptjobtest.cpp )
diff --git a/src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.cpp b/src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.cpp
new file mode 100644
index 0000000..f9a732d
--- /dev/null
+++ b/src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.cpp
@@ -0,0 +1,39 @@
+/*
+ Copyright (c) 2016 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 "checkscriptjobtest.h"
+#include "../checkscriptjob.h"
+#include <QTest>
+
+CheckScriptJobTest::CheckScriptJobTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+CheckScriptJobTest::~CheckScriptJobTest()
+{
+
+}
+
+void CheckScriptJobTest::canBeStarted()
+{
+ KSieveUi::CheckScriptJob job;
+ QVERIFY(!job.canStart());
+}
+
+QTEST_MAIN(CheckScriptJobTest)
diff --git a/src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.h b/src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.h
new file mode 100644
index 0000000..a15bfab
--- /dev/null
+++ b/src/ksieveui/managescriptsjob/autotests/checkscriptjobtest.h
@@ -0,0 +1,34 @@
+/*
+ Copyright (c) 2016 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 CHECKSCRIPTJOBTEST_H
+#define CHECKSCRIPTJOBTEST_H
+
+#include <QObject>
+
+class CheckScriptJobTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit CheckScriptJobTest(QObject *parent = Q_NULLPTR);
+ ~CheckScriptJobTest();
+
+private Q_SLOTS:
+ void canBeStarted();
+};
+
+#endif // CHECKSCRIPTJOBTEST_H