summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-09-03 06:46:26 +0200
committerMontel Laurent <[email protected]>2015-09-03 06:46:26 +0200
commit2dcb4c8a2293ceac42ac3702133519dc67cd450f (patch)
tree86f5905488f70c97f755a2e4de01ccfa8cabea08
parentedf3cbcb1b372a7b1d10bf21dd3cceda9fcb5fe3 (diff)
Improve unitest
-rw-r--r--pimcommon/customtools/autotests/customtoolswidgetngtest.cpp10
-rw-r--r--pimcommon/customtools/autotests/customtoolswidgetngtest.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/pimcommon/customtools/autotests/customtoolswidgetngtest.cpp b/pimcommon/customtools/autotests/customtoolswidgetngtest.cpp
index 71a9b38..390d233 100644
--- a/pimcommon/customtools/autotests/customtoolswidgetngtest.cpp
+++ b/pimcommon/customtools/autotests/customtoolswidgetngtest.cpp
@@ -16,6 +16,8 @@
*/
#include "customtoolswidgetngtest.h"
+#include "customtools/customtoolswidgetng.h"
+#include <QStackedWidget>
#include <QTest>
CustomToolsWidgetNgTest::CustomToolsWidgetNgTest(QObject *parent)
@@ -29,4 +31,12 @@ CustomToolsWidgetNgTest::~CustomToolsWidgetNgTest()
}
+void CustomToolsWidgetNgTest::shouldHaveDefaultValue()
+{
+ PimCommon::CustomToolsWidgetNg widget;
+
+ QStackedWidget *stackWidget = widget.findChild<QStackedWidget *>(QStringLiteral("stackedwidget"));
+ QVERIFY(stackWidget);
+}
+
QTEST_MAIN(CustomToolsWidgetNgTest)
diff --git a/pimcommon/customtools/autotests/customtoolswidgetngtest.h b/pimcommon/customtools/autotests/customtoolswidgetngtest.h
index 94c6f81..febbbff 100644
--- a/pimcommon/customtools/autotests/customtoolswidgetngtest.h
+++ b/pimcommon/customtools/autotests/customtoolswidgetngtest.h
@@ -26,6 +26,9 @@ class CustomToolsWidgetNgTest : public QObject
public:
explicit CustomToolsWidgetNgTest(QObject *parent = Q_NULLPTR);
~CustomToolsWidgetNgTest();
+
+private Q_SLOTS:
+ void shouldHaveDefaultValue();
};
#endif // CUSTOMTOOLSWIDGETNGTEST_H