|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description:Unit testing of SatApp |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #include <QtTest/QtTest> |
|
21 |
|
22 #include "ut_satappmainhandler.h" |
|
23 #include "ut_csatuiobserver.h" |
|
24 #include "ut_satappeventhandler.h" |
|
25 #include "ut_playtoneprovider.h" |
|
26 |
|
27 int main(int argc, char *argv[]) |
|
28 { |
|
29 qDebug("Ut_SatApp: main() >"); |
|
30 QApplication app(argc, argv); |
|
31 |
|
32 int result(0); |
|
33 char *pass[3]; |
|
34 pass[0] = argv[0]; |
|
35 pass[1] = "-o"; |
|
36 pass[2] = "c:\\logs\\sat\\ut_SatAppMainHandler.txt"; |
|
37 |
|
38 qDebug("Test SatAppMainHandler"); |
|
39 Ut_SatAppMainHandler tc; |
|
40 result = QTest::qExec(&tc, 3, pass); |
|
41 qDebug("Ut_SatApp: main() test SatAppMainHandler, result=%d", result); |
|
42 |
|
43 //qDebug("Test CSatUiObserve"); |
|
44 Ut_CSatUiObserver utCSatUiObserver; |
|
45 char *test[3]; |
|
46 test[0] = argv[0]; |
|
47 test[1] = "-o"; |
|
48 test[2] = "c:\\logs\\sat\\ut_CSatUiObserver.txt"; |
|
49 result = QTest::qExec(&utCSatUiObserver, 3, test); |
|
50 qDebug("Ut_SatApp: main() test CSatUiObserver<, result=%d", result); |
|
51 |
|
52 /*Ut_SatAppEventProvider utSatAppEventProvider; |
|
53 char *test_event[3]; |
|
54 test_event[0] = argv[0]; |
|
55 test_event[1] = "-o"; |
|
56 test_event[2] = "c:\\logs\\sat\\ut_SatAppEventProvide.txt"; |
|
57 result = QTest::qExec(&utSatAppEventProvider, 3, test_event); |
|
58 qDebug("Ut_SatApp: main() test SatAppEventProvide<, result=%d", result);*/ |
|
59 |
|
60 Ut_SatAppPlayToneProvider utPlayTone; |
|
61 char *test_playtone[3]; |
|
62 test_playtone[0] = argv[0]; |
|
63 test_playtone[1] = "-o"; |
|
64 test_playtone[2] = "c:\\logs\\sat\\Ut_SatAppPlayToneProvider.txt"; |
|
65 result = QTest::qExec(&utPlayTone, 3, test_playtone); |
|
66 qDebug("Ut_SatApp: main() test SatAppPlayToneProvider<, result=%d", result); |
|
67 |
|
68 return result; |
|
69 } |
|
70 |
|
71 //End of file |