summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-09-28 22:43:08 +0200
committerMontel Laurent <[email protected]>2015-09-28 22:43:08 +0200
commitcadb4d87775cc6c87110b8d0d8f3b0c4a8f0f3e7 (patch)
tree831e2fc7927474fbb96fa5e370a9f0451e2aa4cb
parentf47cfa578d56de64b964cfe139a26e80f5767d68 (diff)
Add autotests
-rw-r--r--messageviewer/src/viewerplugins/autotests/CMakeLists.txt16
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp32
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h31
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp32
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h31
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.cpp31
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.h31
7 files changed, 204 insertions, 0 deletions
diff --git a/messageviewer/src/viewerplugins/autotests/CMakeLists.txt b/messageviewer/src/viewerplugins/autotests/CMakeLists.txt
index 165529d..b480561 100644
--- a/messageviewer/src/viewerplugins/autotests/CMakeLists.txt
+++ b/messageviewer/src/viewerplugins/autotests/CMakeLists.txt
@@ -1,3 +1,16 @@
+
+macro(add_messageviewer_viewerplugin_unittest _source _additional _jsonfile)
+ set( _test ${_source} ${_additional})
+ get_filename_component(_name ${_source} NAME_WE)
+ add_executable( ${_name} ${_test} )
+ kcoreaddons_desktop_to_json(${_name} ${_jsonfile})
+ add_test( ${_name} ${_name} )
+
+ ecm_mark_as_test(messageviewer-viewerplugin-unittest-${_name})
+ target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo KF5::QGpgme Qt5::Test Qt5::WebKitWidgets KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme)
+endmacro ()
+
+
macro(add_messageviewer_viewerplugin_class_unittest _source )
set( _test ${_source})
get_filename_component(_name ${_source} NAME_WE)
@@ -9,3 +22,6 @@ macro(add_messageviewer_viewerplugin_class_unittest _source )
endmacro ()
add_messageviewer_viewerplugin_class_unittest(viewerpluginmanagertest.cpp)
+add_messageviewer_viewerplugin_unittest(viewerplugincreateeventtest.cpp "../createeventplugin/viewerplugincreateevent.cpp;../createeventplugin/viewerplugincreateeventinterface.cpp" "../createeventplugin/messageviewer_createeventplugin.desktop")
+add_messageviewer_viewerplugin_unittest(viewerplugincreatetodotest.cpp "../createtodoplugin/viewerplugincreatetodo.cpp;../createtodoplugin/viewerplugincreatetodointerface.cpp" "../createtodoplugin/messageviewer_createtodoplugin.desktop")
+add_messageviewer_viewerplugin_unittest(viewerplugincreatenotetest.cpp "../createnoteplugin/viewerplugincreatenote.cpp;../createnoteplugin/viewerplugincreatenoteinterface.cpp" "../createnoteplugin/messageviewer_createnoteplugin.desktop")
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp
new file mode 100644
index 0000000..46f04ae
--- /dev/null
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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 "viewerplugincreateeventtest.h"
+#include <QTest>
+
+ViewerPluginCreateeventTest::ViewerPluginCreateeventTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+ViewerPluginCreateeventTest::~ViewerPluginCreateeventTest()
+{
+
+}
+
+QTEST_MAIN(ViewerPluginCreateeventTest)
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h
new file mode 100644
index 0000000..a583877
--- /dev/null
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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 VIEWERPLUGINCREATEEVENTTEST_H
+#define VIEWERPLUGINCREATEEVENTTEST_H
+
+#include <QObject>
+
+class ViewerPluginCreateeventTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ViewerPluginCreateeventTest(QObject *parent = Q_NULLPTR);
+ ~ViewerPluginCreateeventTest();
+};
+
+#endif // VIEWERPLUGINCREATEEVENTTEST_H
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp
new file mode 100644
index 0000000..f570bbf
--- /dev/null
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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 "viewerplugincreatenotetest.h"
+#include <QTest>
+
+ViewerPluginCreateNoteTest::ViewerPluginCreateNoteTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+ViewerPluginCreateNoteTest::~ViewerPluginCreateNoteTest()
+{
+
+}
+
+QTEST_MAIN(ViewerPluginCreateNoteTest)
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h
new file mode 100644
index 0000000..48e69cd
--- /dev/null
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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 VIEWERPLUGINCREATENOTETEST_H
+#define VIEWERPLUGINCREATENOTETEST_H
+
+#include <QObject>
+
+class ViewerPluginCreateNoteTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ViewerPluginCreateNoteTest(QObject *parent = Q_NULLPTR);
+ ~ViewerPluginCreateNoteTest();
+};
+
+#endif // VIEWERPLUGINCREATENOTETEST_H
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.cpp b/messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.cpp
new file mode 100644
index 0000000..5ab73fd
--- /dev/null
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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 "viewerplugincreatetodotest.h"
+#include <QTest>
+ViewerPluginCreateTodoTest::ViewerPluginCreateTodoTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+ViewerPluginCreateTodoTest::~ViewerPluginCreateTodoTest()
+{
+
+}
+
+QTEST_MAIN(ViewerPluginCreateTodoTest)
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.h b/messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.h
new file mode 100644
index 0000000..ee9f3a0
--- /dev/null
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreatetodotest.h
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ 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 VIEWERPLUGINCREATETODOTEST_H
+#define VIEWERPLUGINCREATETODOTEST_H
+
+#include <QObject>
+
+class ViewerPluginCreateTodoTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ViewerPluginCreateTodoTest(QObject *parent = Q_NULLPTR);
+ ~ViewerPluginCreateTodoTest();
+};
+
+#endif // VIEWERPLUGINCREATETODOTEST_H