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: Unit tests for CMusIndicatorApi class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef UT_CMUSINDICATORDSA_H |
|
21 #define UT_CMUSINDICATORDSA_H |
|
22 |
|
23 |
|
24 #include <digia/eunit/ceunittestsuiteclass.h> |
|
25 #include <e32def.h> |
|
26 |
|
27 |
|
28 #ifndef NONSHARABLE_CLASS |
|
29 #define NONSHARABLE_CLASS(x) class x |
|
30 #endif |
|
31 |
|
32 |
|
33 class CMusIndicatorDsa; |
|
34 |
|
35 |
|
36 /** |
|
37 * Unit test class for CMusIndicatorApi class. |
|
38 * Implements unit tests for CMusIndicatorApi class. |
|
39 */ |
|
40 NONSHARABLE_CLASS( UT_CMusIndicatorDsa ) : public CEUnitTestSuiteClass |
|
41 { |
|
42 public: |
|
43 |
|
44 static UT_CMusIndicatorDsa* NewL(); |
|
45 static UT_CMusIndicatorDsa* NewLC(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~UT_CMusIndicatorDsa(); |
|
51 |
|
52 private: |
|
53 |
|
54 UT_CMusIndicatorDsa(); |
|
55 |
|
56 void ConstructL(); |
|
57 |
|
58 /** |
|
59 * Sets up a new test. |
|
60 */ |
|
61 void SetupL(); |
|
62 |
|
63 /** |
|
64 * Tears down a test. |
|
65 */ |
|
66 void Teardown(); |
|
67 |
|
68 /** |
|
69 * Actual unit test methods. |
|
70 */ |
|
71 void UT_CMusIndicatorDsa_NewLL(); |
|
72 void UT_CMusIndicatorDsa_DrawL(); |
|
73 void UT_CMusIndicatorDsa_LoadImageLL(); |
|
74 void UT_CMusIndicatorDsa_LoadResourceStringLL(); |
|
75 void UT_CMusIndicatorDsa_InitializeL(); |
|
76 void UT_CMusIndicatorDsa_TryActivateL(); |
|
77 void UT_CMusIndicatorDsa_StartPeriodicTimerL(); |
|
78 void UT_CMusIndicatorDsa_StopPeriodicTimerL(); |
|
79 void UT_CMusIndicatorDsa_HandleResourceChangeL(); |
|
80 void UT_CMusIndicatorDsa_DoHandleResourceChangeL(); |
|
81 |
|
82 |
|
83 /** |
|
84 * Helpers |
|
85 */ |
|
86 void FakeVisibilityL(); |
|
87 |
|
88 private: // data |
|
89 |
|
90 /** |
|
91 * Tested class. |
|
92 * Own. |
|
93 */ |
|
94 CMusIndicatorDsa* iIndicatorDsa; |
|
95 |
|
96 EUNIT_DECLARE_TEST_TABLE; |
|
97 |
|
98 }; |
|
99 |
|
100 #endif // UT_CMUSINDICATORDSA_H |
|