1 /* |
|
2 * Copyright (c) 2002 - 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: T_ui_context_utility_api test module. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef T_ui_context_utility_api_H |
|
21 #define T_ui_context_utility_api_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "hgtestbase.h" |
|
25 #include "hgctxcontactmatcher.h" |
|
26 |
|
27 // Logging path |
|
28 _LIT( KT_ui_context_utility_apiLogPath, "\\logs\\testframework\\T_ui_context_utility_api\\" ); |
|
29 // Log file |
|
30 _LIT( KT_ui_context_utility_apiLogFile, "T_ui_context_utility_api.txt" ); |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * This a T_ui_context_utility_api class. |
|
36 */ |
|
37 NONSHARABLE_CLASS(CT_ui_context_utility_api) : public CHgTestBase |
|
38 { |
|
39 public: |
|
40 |
|
41 CT_ui_context_utility_api(); |
|
42 |
|
43 void ConstructL(); |
|
44 |
|
45 static CT_ui_context_utility_api* NewL(); |
|
46 |
|
47 void CreateEnvL(); |
|
48 void DestroyEnv(); |
|
49 TInt LoadTestCasesL( |
|
50 TInt& _test_case_no, |
|
51 CT_ui_context_utility_api::TCallReason aRunReason, |
|
52 TInt aTestToRun, |
|
53 RPointerArray<TTestCaseInfo>& aTestCases, |
|
54 TTestResult& aResult); |
|
55 |
|
56 ~CT_ui_context_utility_api(); |
|
57 |
|
58 TInt RunTestL( |
|
59 CT_ui_context_utility_api::TCallReason aRunReason, |
|
60 TInt aTestToRun, |
|
61 RPointerArray<TTestCaseInfo>& aTestCases, |
|
62 TTestResult& aResult); |
|
63 |
|
64 RPtrHashMap<TDesC, TDesC>* GetImplHashTablePtr() |
|
65 { |
|
66 class CTestUtility : public CBase |
|
67 { |
|
68 public: |
|
69 CHgContextUtilityImpl* iImpl; |
|
70 }; |
|
71 |
|
72 class CTestImplementation : CTimer |
|
73 { |
|
74 public: |
|
75 // number of pointers before iMusicContextInfo, calculate M-classes as pointers too |
|
76 TInt unneeded[12]; |
|
77 RPtrHashMap<TDesC, TDesC> iMusicContextInfo; |
|
78 }; |
|
79 |
|
80 // Fetch the pointer to hash table for testing purposes |
|
81 return &((CTestImplementation*)((CTestUtility*)iContextUtility)->iImpl)->iMusicContextInfo; |
|
82 } |
|
83 #define TEST_VAR_DECLARATIONS |
|
84 /** |
|
85 * all testmodule-global variables declarations are inserted here |
|
86 */ |
|
87 #include "../src/T_ui_context_utility_api_cases.cpp" |
|
88 #undef TEST_VAR_DECLARATIONS |
|
89 |
|
90 // for creating test env |
|
91 CTrapCleanup* ENV_cleanup; |
|
92 TInt ENV_err; |
|
93 CEikonEnv* ENV_env; |
|
94 CAknAppUi* ENV_aknAppUI; |
|
95 }; |
|
96 |
|
97 #endif // T_ui_context_utility_api_H |
|
98 |
|
99 // End of File |
|