comparison ui/tests/mainwindowtest.cpp @ 563:aee3eb10bbba

Add unit test for sw update execution and fix shell execute params
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 22 May 2014 15:18:06 +0000
parents dd8a295d5b4d
children 2fd4f9980a2a
comparison
equal deleted inserted replaced
562:ccdc4c6b97ce 563:aee3eb10bbba
5 * and comes with ABSOLUTELY NO WARRANTY! 5 * and comes with ABSOLUTELY NO WARRANTY!
6 * See LICENSE.txt for details. 6 * See LICENSE.txt for details.
7 */ 7 */
8 8
9 #include "mainwindowtest.h" 9 #include "mainwindowtest.h"
10
11 #include <QSignalSpy>
10 12
11 #ifdef Q_OS_WIN 13 #ifdef Q_OS_WIN
12 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) 14 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
13 #else 15 #else
14 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) 16 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
24 void MainWindowTest::testInvalidUpdate() { 26 void MainWindowTest::testInvalidUpdate() {
25 // TODO 27 // TODO
26 } 28 }
27 29
28 void MainWindowTest::testValidUpdate() { 30 void MainWindowTest::testValidUpdate() {
29 // TODO 31 QSignalSpy closed(this, SIGNAL(closeCalled()));
32 #ifdef Q_OS_WIN
33 installNewSW(QString::fromLatin1("c:/fakeinst.exe"), QDateTime::currentDateTime());
34 #else
35 installNewSW(QString::fromLatin1("fakeinst"), QDateTime::currentDateTime());
36 #endif
37 QVERIFY(closed.count() == 1);
30 } 38 }
31 39
32 QTEST_MAIN(MainWindowTest); 40 QTEST_MAIN(MainWindowTest);

http://wald.intevation.org/projects/trustbridge/