|
1 /* |
|
2 * Copyright (c) 2009 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_vimpstengineimsubservice.h |
|
15 * |
|
16 */ |
|
17 #ifndef _T_VimpstEngineImSubService_H_ |
|
18 #define _T_VimpstEngineImSubService_H_ |
|
19 |
|
20 // EXTERNAL INCLUDES |
|
21 #include <CEUnitTestSuiteClass.h> |
|
22 #include "mvimpstengineserviceconnectioneventobserver.h" |
|
23 #include "mvimpstengineimsubserviceeventobserver.h" // MVIMPSTEngineIMSubServiceEventObserver |
|
24 #include "mvimpstenginecchuieventobserver.h" |
|
25 |
|
26 class CVIMPSTEngineIMSubService; |
|
27 class CVIMPSTEngineCchHandler; |
|
28 class CVIMPSTEngineServiceTableFetcher; |
|
29 class T_VimpstEngineImSubService : |
|
30 public CEUnitTestSuiteClass, |
|
31 public MVIMPSTEngineServiceConnectionEventObserver, |
|
32 public MVIMPSTEngineIMSubServiceEventObserver |
|
33 { |
|
34 public: |
|
35 |
|
36 static T_VimpstEngineImSubService* NewLC(); |
|
37 ~T_VimpstEngineImSubService(); |
|
38 |
|
39 public: // From observer interface |
|
40 |
|
41 // From MVIMPSTEngineServiceConnectionEventObserver |
|
42 void HandleServceConnectionEventL( ); |
|
43 |
|
44 // From MVIMPSTEngineIMSubServiceEventObserver |
|
45 void HandleChatMessageEventL(TVIMPSTEnums::TIMEventType aEventType ,const TDesC& aSender); |
|
46 |
|
47 private: |
|
48 |
|
49 void ConstructL(); |
|
50 void SetupL(); |
|
51 void Teardown(); |
|
52 |
|
53 // Help methods |
|
54 TInt CreateSpEntryL( TInt aServiceId ); |
|
55 |
|
56 // Test methods |
|
57 void T_NewLL(); |
|
58 void T_RegisterChatObserverL(); |
|
59 void T_UnRegisterChatObserverL(); |
|
60 void T_HandleIMCacheEventLL(); |
|
61 void T_GetUnreadCountL(); |
|
62 void T_SubServiceStateL(); |
|
63 void T_IsConversationExistLL(); |
|
64 void T_ResolveServiceStateLL(); |
|
65 void T_TypeL(); |
|
66 void T_CchEventOccuredLL(); |
|
67 void T_DoHandleCchErrorLL(); |
|
68 void T_CreateIMCacheAccessorLL(); |
|
69 void T_ReleaseIMCacheAccessorL(); |
|
70 void T_IsConversationDoesntExistLL(); |
|
71 |
|
72 void T_CloseConversationExisitingConversationLL(); |
|
73 void T_CloseConversationNonExisitingConversationLL(); |
|
74 |
|
75 |
|
76 void T_IsConversationExistNoIMCacheAccessorL(); |
|
77 void T_CloseConversationNoIMCacheAccessorL(); |
|
78 void T_GetUnreadCountNoIMCacheAccessorL(); |
|
79 |
|
80 void T_RegisterNULLChatObserverL(); |
|
81 void T_UnRegisterNULLChatObserverL(); |
|
82 |
|
83 |
|
84 void T_RegisterChatObserverTwiceL(); |
|
85 void T_UnRegisterChatObserverTwiceL(); |
|
86 |
|
87 void T_HandleIMCacheEventWithRegisteredObserverL(); |
|
88 |
|
89 |
|
90 private: |
|
91 |
|
92 T_VimpstEngineImSubService() {}; |
|
93 |
|
94 private: |
|
95 |
|
96 CVIMPSTEngineCchHandler* iCchHandler; |
|
97 CVIMPSTEngineServiceTableFetcher* iServiceTableFetcher; |
|
98 CVIMPSTEngineIMSubService* iImSubService; |
|
99 MVIMPSTEngineCchUiEventObserver* iCchUiEventObserver; |
|
100 |
|
101 TInt iTestServiceId; |
|
102 |
|
103 TBool iChatMsgReceived; |
|
104 TBool iAddRequestReceived; |
|
105 |
|
106 EUNIT_DECLARE_TEST_TABLE; |
|
107 }; |
|
108 |
|
109 #endif // _T_VimpstEngineImSubService_H_ |
|
110 |
|
111 // end of file |