summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-09-29 07:01:52 +0200
committerMontel Laurent <[email protected]>2015-09-29 07:01:52 +0200
commit4c8c4fd1a8d7350339205c7c6d203e7c67699d5a (patch)
tree6085a07381b2d6fbe4f53e3c4cabed5e699d560a
parentb8f966bc7d13d8ce14f92be75d7e4b684ed6d4b2 (diff)
Validate plugin
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp9
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h3
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp9
-rw-r--r--messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h3
4 files changed, 24 insertions, 0 deletions
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp
index 46f04ae..093f165 100644
--- a/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.cpp
@@ -16,6 +16,8 @@
*/
#include "viewerplugincreateeventtest.h"
+#include "../createeventplugin/viewerplugincreateevent.h"
+#include <KActionCollection>
#include <QTest>
ViewerPluginCreateeventTest::ViewerPluginCreateeventTest(QObject *parent)
@@ -29,4 +31,11 @@ ViewerPluginCreateeventTest::~ViewerPluginCreateeventTest()
}
+void ViewerPluginCreateeventTest::shouldHaveDefaultValue()
+{
+ MessageViewer::ViewerPluginCreateevent *event = new MessageViewer::ViewerPluginCreateevent(this);
+ QVERIFY(!event->viewerPluginName().isEmpty());
+ QVERIFY(event->createView(new QWidget(0), new KActionCollection(this)));
+}
+
QTEST_MAIN(ViewerPluginCreateeventTest)
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h
index a583877..753bffb 100644
--- a/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreateeventtest.h
@@ -26,6 +26,9 @@ class ViewerPluginCreateeventTest : public QObject
public:
explicit ViewerPluginCreateeventTest(QObject *parent = Q_NULLPTR);
~ViewerPluginCreateeventTest();
+
+private Q_SLOTS:
+ void shouldHaveDefaultValue();
};
#endif // VIEWERPLUGINCREATEEVENTTEST_H
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp
index f570bbf..8a86b55 100644
--- a/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.cpp
@@ -16,6 +16,8 @@
*/
#include "viewerplugincreatenotetest.h"
+#include "../createnoteplugin/viewerplugincreatenote.h"
+#include <KActionCollection>
#include <QTest>
ViewerPluginCreateNoteTest::ViewerPluginCreateNoteTest(QObject *parent)
@@ -29,4 +31,11 @@ ViewerPluginCreateNoteTest::~ViewerPluginCreateNoteTest()
}
+void ViewerPluginCreateNoteTest::shouldHaveDefaultValue()
+{
+ MessageViewer::ViewerPluginCreatenote *note = new MessageViewer::ViewerPluginCreatenote(this);
+ QVERIFY(!note->viewerPluginName().isEmpty());
+ QVERIFY(note->createView(new QWidget(0), new KActionCollection(this)));
+}
+
QTEST_MAIN(ViewerPluginCreateNoteTest)
diff --git a/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h
index 48e69cd..29994be 100644
--- a/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h
+++ b/messageviewer/src/viewerplugins/autotests/viewerplugincreatenotetest.h
@@ -26,6 +26,9 @@ class ViewerPluginCreateNoteTest : public QObject
public:
explicit ViewerPluginCreateNoteTest(QObject *parent = Q_NULLPTR);
~ViewerPluginCreateNoteTest();
+
+private Q_SLOTS:
+ void shouldHaveDefaultValue();
};
#endif // VIEWERPLUGINCREATENOTETEST_H