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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UT_SATAPPINPUTPROVIDER_H |
|
19 #define UT_SATAPPINPUTPROVIDER_H |
|
20 |
|
21 // includes |
|
22 #include <QtTest/QtTest> |
|
23 #include <QObject> |
|
24 |
|
25 |
|
26 // forward declarations |
|
27 class SatAppInputProvider; |
|
28 |
|
29 |
|
30 |
|
31 // QTest class |
|
32 class Ut_SatAppInputProvider : public QObject |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public: |
|
37 |
|
38 Ut_SatAppInputProvider( |
|
39 QObject *parent = 0); |
|
40 |
|
41 private slots: |
|
42 |
|
43 void testResetState(); |
|
44 |
|
45 void testGetInkeyAndOk_data(); |
|
46 void testGetInkeyAndOk(); |
|
47 void testGetInkeyAndCancel_data(); |
|
48 void testGetInkeyAndCancel(); |
|
49 void testGetInkeyAndTimeout(); |
|
50 void testGetInkeyAndReset(); |
|
51 void testGetInkeyAndDelete(); |
|
52 |
|
53 void testGetInkeyImmediateAndOk(); |
|
54 void testGetInkeyImmediateAndCancel(); |
|
55 |
|
56 void testGetInputAndOk_data(); |
|
57 void testGetInputAndOk(); |
|
58 void testGetInputAndCancel_data(); |
|
59 void testGetInputAndCancel(); |
|
60 void testGetInputAndTimeout(); |
|
61 void testGetInputAndReset(); |
|
62 void testGetInputAndDelete(); |
|
63 |
|
64 private: |
|
65 |
|
66 |
|
67 }; |
|
68 |
|
69 |
|
70 // internal helper class |
|
71 class InputProviderTest: public QObject |
|
72 { |
|
73 Q_OBJECT |
|
74 |
|
75 public: |
|
76 |
|
77 InputProviderTest(); |
|
78 ~InputProviderTest(); |
|
79 |
|
80 public slots: |
|
81 |
|
82 void simulateFirstActionClicked(); |
|
83 void simulateSecondActionClicked(); |
|
84 void simulateImmediateKeypress(QString s); |
|
85 void cleanup(); |
|
86 |
|
87 public: |
|
88 |
|
89 |
|
90 // test data |
|
91 SatAppInputProvider *mInput; |
|
92 |
|
93 }; |
|
94 |
|
95 |
|
96 #endif // UT_SATAPPINPUTPROVIDER_H |
|