|
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 test CSatUiObserver class |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UT_SATAPPSERVERDISPATCHER_H |
|
19 #define UT_SATAPPSERVERDISPATCHER_H |
|
20 |
|
21 #include <QtTest/QtTest> |
|
22 #include <QObject> |
|
23 |
|
24 // Class forwards |
|
25 class SatAppServerDispatcher; |
|
26 class SatAppAction; |
|
27 |
|
28 /** |
|
29 * CSatUiObserver unit test class. |
|
30 */ |
|
31 class Ut_SatAppServerDispatcher : public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 public: |
|
36 Ut_SatAppServerDispatcher(QObject *parent = 0); |
|
37 |
|
38 private slots: |
|
39 |
|
40 void initTestCase(); |
|
41 void cleanupTestCase(); |
|
42 |
|
43 //test MSatUiObserver api |
|
44 void testDisplayText_data(); |
|
45 void testDisplayText(); |
|
46 void testGetInkey_data(); |
|
47 void testGetInkey(); |
|
48 void testGetInput_data(); |
|
49 void testGetInput(); |
|
50 void testSetUpMenu_data(); |
|
51 void testSetUpMenu(); |
|
52 void testSelectItem_data(); |
|
53 void testSelectItem(); |
|
54 void testPlayTone_data(); |
|
55 void testPlayTone(); |
|
56 void testConfirmCommand_data(); |
|
57 void testConfirmCommand(); |
|
58 void testNotification_data(); |
|
59 void testNotification(); |
|
60 void testEventNotification_data(); |
|
61 void testEventNotification(); |
|
62 |
|
63 // test slots |
|
64 void testMenuSelection(); |
|
65 void testUserCancelSession(); |
|
66 |
|
67 private: |
|
68 |
|
69 SatAppServerDispatcher *mServer; |
|
70 |
|
71 }; |
|
72 |
|
73 |
|
74 // internal helper class |
|
75 class ServerDispatcherHelper: public QObject |
|
76 { |
|
77 Q_OBJECT |
|
78 |
|
79 public slots: |
|
80 void exec(SatAppAction& action); |
|
81 void simulateItemSelected(SatAppAction& action); |
|
82 }; |
|
83 |
|
84 #endif // UT_SATAPPSERVERDISPATCHER_H |