|
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: XIMP Framework Test Code |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef T_PRESENCEGROUPLISTMANAGEMENT_H |
|
19 #define T_PRESENCEGROUPLISTMANAGEMENT_H |
|
20 |
|
21 #include <ceunittestsuiteclass.h> |
|
22 #include <ximpbase.h> |
|
23 #include "prfwteststatuseventlistener.h" |
|
24 #include "prfwtestmessaging.h" |
|
25 |
|
26 class CXIMPTestContextWrapper; |
|
27 class CXIMPTestContextWrapperMgr; |
|
28 class CXIMPTestMessenger; |
|
29 class CPresentityGroupInfoImp; |
|
30 class CPresentityGroupListEventImp; |
|
31 |
|
32 /** |
|
33 * XIMP Framework Eunit tests. |
|
34 * |
|
35 * Tests for XIMP session management services. |
|
36 * |
|
37 * @since S60 v4.0 |
|
38 */ |
|
39 class T_PresenceGroupListManagement : public CEUnitTestSuiteClass |
|
40 { |
|
41 |
|
42 public: |
|
43 static T_PresenceGroupListManagement* NewL(); |
|
44 virtual ~T_PresenceGroupListManagement(); |
|
45 |
|
46 |
|
47 private: |
|
48 T_PresenceGroupListManagement(); |
|
49 void ConstructL(); |
|
50 |
|
51 private: // Test case functions |
|
52 |
|
53 void Setup_L(); |
|
54 void SetupMultiple_L(); |
|
55 void BindL(); |
|
56 void BindAllL(); |
|
57 void Teardown(); |
|
58 void UnbindL(); |
|
59 void UnbindAllL(); |
|
60 void SubscribeL(); |
|
61 void SubscribeGroupL( const TDesC& aGroupId ); |
|
62 void UnsubscribeGroupL( const TDesC& aGroupId ); |
|
63 void UnsubscribeL(); |
|
64 |
|
65 void T_SubscribePresentityGroup_Single_L(); |
|
66 void T_UnsubscribePresentityGroup_Error_Single_L(); |
|
67 void T_SubscribePresentityGroup_Error_Single_L(); |
|
68 void T_SubscribePresentityGroup_Multiple_L(); |
|
69 void T_UpdateDisplayName_Single_L(); |
|
70 void T_HandlePresentityGroupList_L(); |
|
71 void T_HandlePresentityGroupList_Subscribed_L(); |
|
72 void T_HandlePresentityGroupCreateAndDelete_L(); |
|
73 void T_HandlePresentityGroupUpdate_L(); |
|
74 void T_HandlePresentityGroupUpdate_WithHelpers_L(); |
|
75 void T_SubscribePresentityGroup_One_Multiple_L(); |
|
76 void T_RefreshPresentityGroup_One_Multiple_L(); |
|
77 void T_UnsubNonsubscribed_Single_L(); |
|
78 void T_RefreshPresentityGroup_Multiple_L(); |
|
79 void T_SubscribeAll_One_Unsub_Multiple_L(); |
|
80 |
|
81 void T_UpdateDisplayNameL( |
|
82 const TDesC& aGroupId, |
|
83 const TDesC& aDispName ); |
|
84 |
|
85 private: // Test helpers |
|
86 |
|
87 /** |
|
88 * Fake a server-originated (=mobile terminated) message. |
|
89 * The message appears to adaptation and framework as if |
|
90 * it came from the network. Uses only one group. |
|
91 * @param aUri The URI of group |
|
92 * @param aDispName The display name for the group |
|
93 * @param aMsgType The message type for CXIMPTestFileSrvMsg |
|
94 */ |
|
95 void SendSrvMsgL( |
|
96 const TDesC& aUri, const TDesC& aDispName, |
|
97 TInt aMsgType ); |
|
98 |
|
99 /** |
|
100 * Fake a server-originated message with empty content. |
|
101 * Whether to use this depends on the event you expect. |
|
102 * @see SendSrvMsgL |
|
103 */ |
|
104 void SendSrvMsgL( TInt aMsgType ); |
|
105 |
|
106 private: // Test data |
|
107 |
|
108 /** |
|
109 * Eunit test case table declaration. |
|
110 */ |
|
111 EUNIT_DECLARE_TEST_TABLE; |
|
112 |
|
113 // owned |
|
114 CXIMPTestContextWrapperMgr* iWrapperMgr; |
|
115 |
|
116 // |
|
117 TInt iLastError; |
|
118 RXIMPObjOwningPtrArray< CPresentityGroupInfoImp > iValidateArray; |
|
119 }; |
|
120 |
|
121 |
|
122 #endif // T_PRESENCEGROUPLISTMANAGEMENT_H |
|
123 |
|
124 |
|
125 |
|
126 // end of file |
|
127 |
|
128 |
|
129 |