|
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_PRESENCEPUBLISHING_H |
|
19 #define T_PRESENCEPUBLISHING_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 |
|
30 /** |
|
31 * XIMP Framework Eunit tests. |
|
32 * |
|
33 * Tests for XIMP session management services. |
|
34 * |
|
35 * @since S60 v4.0 |
|
36 */ |
|
37 class T_PresencePublishing : public CEUnitTestSuiteClass |
|
38 { |
|
39 |
|
40 public: |
|
41 static T_PresencePublishing* NewL(); |
|
42 virtual ~T_PresencePublishing(); |
|
43 |
|
44 |
|
45 private: |
|
46 T_PresencePublishing(); |
|
47 void ConstructL(); |
|
48 |
|
49 |
|
50 |
|
51 private: // Test case functions |
|
52 |
|
53 void Setup_L(); |
|
54 void SetupMultiple_L(); |
|
55 void BindL(); |
|
56 void Bind2L(); |
|
57 void BindAllL(); |
|
58 void Teardown(); |
|
59 void UnbindL(); |
|
60 void UnbindAllL(); |
|
61 |
|
62 |
|
63 //------------------------------------------ |
|
64 //Presence Publish |
|
65 // |
|
66 void T_Publish_Single_L(); |
|
67 |
|
68 // Maybe unneeded cases. All events should act likewise and these |
|
69 // kind of situations are tested in t_sessionmng already. |
|
70 void T_Publish_ErrFromPlg_Leave_L(); |
|
71 void T_Publish_ErrFromPlg_CompleteWithError_L(); |
|
72 |
|
73 |
|
74 //------------------------------------------ |
|
75 //Presence interest registration |
|
76 // |
|
77 void T_SubscribeOwnPresence_Single_Empty_L(); |
|
78 void T_SubscribeOwnPresence_Multiple_Empty_L(); |
|
79 void T_SubscribeOwnPresence_Single_L(); |
|
80 void T_SubscribeOwnPresence_Publish_Single_L(); |
|
81 void T_SubscribeOwnPresence_Two_Clients_L(); |
|
82 void T_ErrFromPlg_LeaveOnSubscribeOwnPresence_L(); |
|
83 void T_NetworkUnplugError_L(); |
|
84 void T_NetworkUnplugErrorMultiple_L(); |
|
85 |
|
86 // Plugin leaves with error, returns error. Same as above. |
|
87 //void T_InterestRegistration_ErrorFromPlg_Leave_L(); |
|
88 //void T_InterestRegistration_ErrorFromPlg_Error_L(); |
|
89 |
|
90 //------------------------------------------ |
|
91 // Input data verification tests |
|
92 // TODO when the mechanism for |
|
93 // |
|
94 // Verify that plugin receives correct input data |
|
95 // - single publish |
|
96 // - single registration |
|
97 // - aggregated registrations |
|
98 // Verify that the test case received correct data (verify plugin output data) |
|
99 // - own presence event |
|
100 // - UpdatePresenceL / presentity event |
|
101 // - filter registration verifications on presentity events |
|
102 |
|
103 private: // Test helpers |
|
104 |
|
105 void SetupListenerReqCompleteL( CXIMPTestContextWrapper* aWrapper, TXIMPTestStatusEventTemplate aEventType ); |
|
106 void SetupListenerReqCompleteAllowEventsL( CXIMPTestContextWrapper* aWrapper, TXIMPTestStatusEventTemplate aEventTypes ); |
|
107 // TODO move these to some TOOL part - could be common |
|
108 // among all components |
|
109 |
|
110 MPresenceInfo* CreateInfoLC(); |
|
111 |
|
112 private: // Test data |
|
113 |
|
114 /** |
|
115 * Eunit test case table declaration. |
|
116 */ |
|
117 EUNIT_DECLARE_TEST_TABLE; |
|
118 |
|
119 // owned |
|
120 CXIMPTestContextWrapperMgr* iWrapperMgr; |
|
121 }; |
|
122 |
|
123 #endif // T_PRESENCEPUBLISHING_H |
|
124 |
|
125 |
|
126 |
|
127 // end of file |
|
128 |
|
129 |
|
130 |
|
131 |