|
1 /* |
|
2 * Copyright (c) 2007 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: Show commmand handler unit test |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __T_CGlxCommandHandlerFilterImagesOrVideos_H__ |
|
22 #define __T_CGlxCommandHandlerFilterImagesOrVideos_H__ |
|
23 |
|
24 /** |
|
25 * @internal reviewed 08/02/2008 by Rhodri Byles |
|
26 */ |
|
27 |
|
28 // EXTERNAL INCLUDES |
|
29 #include <CEUnitTestSuiteClass.h> |
|
30 #include <EUnitDecorators.h> |
|
31 #include <mglxmedialistprovider.h> |
|
32 #include <EIKMOBS.H> |
|
33 #include <tmglxmedialist_stub.h> |
|
34 |
|
35 // INTERNAL INCLUDES |
|
36 |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 class CGlxCommandHandlerFilterImagesOrVideos; |
|
40 |
|
41 // CLASS DEFINITION |
|
42 /** |
|
43 * EUnit test suite for CGlxCommandHandlerFilterImagesOrVideos |
|
44 * |
|
45 */ |
|
46 NONSHARABLE_CLASS( T_CGlxCommandHandlerFilterImagesOrVideos ) |
|
47 : public CEUnitTestSuiteClass, |
|
48 public MEikMenuObserver, |
|
49 public MGlxMediaList_Stub_Observer, |
|
50 public MGlxMediaListProvider |
|
51 { |
|
52 public: // Constructors and destructors |
|
53 |
|
54 /** |
|
55 * Two phase construction |
|
56 */ |
|
57 static T_CGlxCommandHandlerFilterImagesOrVideos* NewL(); |
|
58 static T_CGlxCommandHandlerFilterImagesOrVideos* NewLC(); |
|
59 /** |
|
60 * Destructor |
|
61 */ |
|
62 ~T_CGlxCommandHandlerFilterImagesOrVideos(); |
|
63 |
|
64 private: // From MGlxMediaList_Stub_Observer |
|
65 void MGlxMediaList_MethodCalled( TMGlxMediaListMethodId aMethodId ); |
|
66 |
|
67 private: // From MGlxMediaListProvider |
|
68 |
|
69 MGlxMediaList& MediaList(); |
|
70 |
|
71 private: // Constructors and destructors |
|
72 |
|
73 T_CGlxCommandHandlerFilterImagesOrVideos(); |
|
74 void ConstructL(); |
|
75 |
|
76 private: // From MEikMenuObserver |
|
77 void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis); |
|
78 void ProcessCommandL(TInt aCommandId); |
|
79 |
|
80 private: // New methods |
|
81 |
|
82 void SetupL(); |
|
83 |
|
84 void Teardown(); |
|
85 |
|
86 void TestConstructionL( ); |
|
87 |
|
88 // helper methods to check the filter |
|
89 void TestForImages(); |
|
90 void TestForVideos(); |
|
91 void TestForAll(); |
|
92 |
|
93 |
|
94 private: // Test methods |
|
95 |
|
96 void TestSetAllFromNoneL(); |
|
97 void TestSetImagesFromNoneL(); |
|
98 void TestSetVideosFromNoneL(); |
|
99 void TestSetAllFromImagesL(); |
|
100 void TestSetVideosFromImagesL(); |
|
101 void TestSetAllFromVideosL(); |
|
102 void TestSetImagesFromVideosL(); |
|
103 void TestSetVideosFromAllL(); |
|
104 void TestSetImagesFromAllL(); |
|
105 void TestNavigateForwards(); |
|
106 void TestNavigateBackwards(); |
|
107 |
|
108 private: // Data |
|
109 |
|
110 CGlxCommandHandlerFilterImagesOrVideos* iCommandHandlerShowItems; |
|
111 |
|
112 TMGlxMediaList_Stub* iStubMediaList; |
|
113 |
|
114 TMGlxMediaListMethodId iMethodId; |
|
115 |
|
116 EUNIT_DECLARE_TEST_TABLE; |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // __T_CGlxCommandHandlerFilterImagesOrVideos_H__ |
|
121 |
|
122 // End of file |