|
1 /* |
|
2 * Copyright (c) 2006 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: CommandHandlerMarking unit test cases |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __T_GLXCOMMANDHANDLERMARKING_H__ |
|
22 #define __T_GLXCOMMANDHANDLERMARKING_H__ |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <CEUnitTestSuiteClass.h> |
|
26 #include <EUnitDecorators.h> |
|
27 |
|
28 #include "glxcommandhandlermarking.h" |
|
29 #include <mglxmedialistprovider.h> |
|
30 #include <mglxsoftkeyhandler.h> |
|
31 #include <glxcommandhandler.h> |
|
32 |
|
33 // INTERNAL INCLUDES |
|
34 |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class _CGlxTestMediaList; |
|
38 |
|
39 // CLASS DEFINITION |
|
40 |
|
41 class CGlxMarkingCommandHandlerTester: public CBase, |
|
42 public MGlxMediaListProvider, |
|
43 public MGlxSoftkeyHandler |
|
44 { |
|
45 public: |
|
46 static CGlxMarkingCommandHandlerTester* NewL(); |
|
47 ~CGlxMarkingCommandHandlerTester(); |
|
48 |
|
49 TBool ExecuteL(TInt aCommand); |
|
50 |
|
51 TBool OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
52 |
|
53 void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType, TInt aNewIndex, TInt aOldIndex); |
|
54 |
|
55 public: // From MGlxMediaListProvider |
|
56 virtual MGlxMediaList& MediaList(); |
|
57 |
|
58 public: // From MGlxSoftkeyHandler |
|
59 void StoreCurrentSoftKeysL() {}; |
|
60 |
|
61 void ChangeSoftkeyL(TGlxSoftkey , TInt , |
|
62 const TDesC& ) {}; |
|
63 |
|
64 void RestoreSoftKeysAndTitleL() {}; |
|
65 |
|
66 void EnableSoftkey( TBool, TGlxSoftkey ) {}; |
|
67 |
|
68 private: |
|
69 CGlxMarkingCommandHandlerTester(); |
|
70 void ConstructL(); |
|
71 |
|
72 private: |
|
73 CGlxCommandHandlerMarking* iMarker; |
|
74 |
|
75 _CGlxTestMediaList* iMediaList; |
|
76 |
|
77 RPointerArray<CGlxCommandHandler> iCommandHandlerList; |
|
78 }; |
|
79 |
|
80 /** |
|
81 * TODO Auto-generated EUnit test suite |
|
82 * |
|
83 */ |
|
84 NONSHARABLE_CLASS( ut__commandhandlermarking ) |
|
85 : public CEUnitTestSuiteClass |
|
86 { |
|
87 public: // Constructors and destructors |
|
88 |
|
89 /** |
|
90 * Two phase construction |
|
91 */ |
|
92 static ut__commandhandlermarking* NewL(); |
|
93 static ut__commandhandlermarking* NewLC(); |
|
94 /** |
|
95 * Destructor |
|
96 */ |
|
97 ~ut__commandhandlermarking(); |
|
98 |
|
99 private: // Constructors and destructors |
|
100 |
|
101 ut__commandhandlermarking(); |
|
102 void ConstructL(); |
|
103 |
|
104 private: // New methods |
|
105 |
|
106 void SetupL(); |
|
107 |
|
108 void Teardown(); |
|
109 |
|
110 void T_TestCreateL(); |
|
111 |
|
112 void T_TestExecuteNoItemsL(); |
|
113 |
|
114 void T_TestExecuteItemsL(); |
|
115 |
|
116 void T_TestOfferKeyL(); |
|
117 |
|
118 |
|
119 private: // Data |
|
120 CGlxMarkingCommandHandlerTester* iTester; |
|
121 |
|
122 EUNIT_DECLARE_TEST_TABLE; |
|
123 |
|
124 }; |
|
125 |
|
126 #endif // __T_GLXCOMMANDHANDLERMARKING_H__ |
|
127 |
|
128 // End of file |