|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // CLASS HEADER |
|
22 #include "ut_cmcesipextensions.h" |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <digia/eunit/eunitmacros.h> |
|
26 |
|
27 // INTERNAL INCLUDES |
|
28 #include "ut_cmcesipextensions.h" |
|
29 #include "MCETestHelper.h" |
|
30 #include "mcesipextensions.h" |
|
31 #include "mcedictionary.h" |
|
32 #include "sipclienttransaction.h" |
|
33 #include <sipstrings.h> |
|
34 #include <sipstrconsts.h> |
|
35 #include <siprequireheader.h> |
|
36 #include <sipsupportedheader.h> |
|
37 #include <sipallowheader.h> |
|
38 |
|
39 _LIT8( KUnKnownSupported, "MySupported" ); |
|
40 _LIT8( KUnKnownRequire, "MyRequire" ); |
|
41 |
|
42 #define MCE_ASSERT_LOCAL_EXTENSIONS( prack, qos, update, allowPrack, subscribe, refer, notify )\ |
|
43 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::E100rel ) == prack );\ |
|
44 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::EQosPreconds ) == qos );\ |
|
45 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::EUpdate ) == update );\ |
|
46 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::EPrack ) == allowPrack );\ |
|
47 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::ESubscribe ) == subscribe );\ |
|
48 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::ERefer ) == refer );\ |
|
49 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::ENotify ) == notify ); |
|
50 |
|
51 #define MCE_ASSERT_REMOTE_EXTENSIONS( prack, qos, update, allowPrack, subscribe, refer, notify )\ |
|
52 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::E100rel ) == prack );\ |
|
53 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::EQosPreconds ) == qos );\ |
|
54 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::EUpdate ) == update );\ |
|
55 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::EPrack ) == allowPrack );\ |
|
56 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::ESubscribe ) == subscribe );\ |
|
57 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::ERefer ) == refer );\ |
|
58 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::ENotify ) == notify ); |
|
59 |
|
60 #define MCE_RESET_EXTENSIONS()\ |
|
61 iExtensions->SetLocal( CMceSipExtensions::E100rel, CMceSipExtensions::ESupported );\ |
|
62 iExtensions->SetLocal( CMceSipExtensions::EQosPreconds, CMceSipExtensions::ESupported );\ |
|
63 iExtensions->SetLocal( CMceSipExtensions::EUpdate, CMceSipExtensions::ESupported );\ |
|
64 iExtensions->SetLocal( CMceSipExtensions::EPrack, CMceSipExtensions::ESupported );\ |
|
65 iExtensions->SetLocal( CMceSipExtensions::ESubscribe, CMceSipExtensions::ESupported );\ |
|
66 iExtensions->SetLocal( CMceSipExtensions::ERefer, CMceSipExtensions::ESupported );\ |
|
67 iExtensions->SetLocal( CMceSipExtensions::ENotify, CMceSipExtensions::ESupported );\ |
|
68 iExtensions->SetRemote( CMceSipExtensions::E100rel, CMceSipExtensions::ESupported );\ |
|
69 iExtensions->SetRemote( CMceSipExtensions::EQosPreconds, CMceSipExtensions::ESupported );\ |
|
70 iExtensions->SetRemote( CMceSipExtensions::EUpdate, CMceSipExtensions::ESupported );\ |
|
71 iExtensions->SetRemote( CMceSipExtensions::EPrack, CMceSipExtensions::ESupported );\ |
|
72 iExtensions->SetRemote( CMceSipExtensions::ESubscribe, CMceSipExtensions::ESupported );\ |
|
73 iExtensions->SetRemote( CMceSipExtensions::ERefer, CMceSipExtensions::ESupported );\ |
|
74 iExtensions->SetRemote( CMceSipExtensions::ENotify, CMceSipExtensions::ESupported ); |
|
75 |
|
76 |
|
77 // CONSTRUCTION |
|
78 UT_CMceSipExtensions* UT_CMceSipExtensions::NewL() |
|
79 { |
|
80 UT_CMceSipExtensions* self = UT_CMceSipExtensions::NewLC(); |
|
81 CleanupStack::Pop(); |
|
82 |
|
83 return self; |
|
84 } |
|
85 |
|
86 UT_CMceSipExtensions* UT_CMceSipExtensions::NewLC() |
|
87 { |
|
88 UT_CMceSipExtensions* self = new( ELeave ) UT_CMceSipExtensions(); |
|
89 CleanupStack::PushL( self ); |
|
90 |
|
91 self->ConstructL(); |
|
92 |
|
93 |
|
94 return self; |
|
95 } |
|
96 |
|
97 // Destructor (virtual by CBase) |
|
98 UT_CMceSipExtensions::~UT_CMceSipExtensions() |
|
99 { |
|
100 } |
|
101 |
|
102 // Default constructor |
|
103 UT_CMceSipExtensions::UT_CMceSipExtensions() |
|
104 { |
|
105 } |
|
106 |
|
107 // Second phase construct |
|
108 void UT_CMceSipExtensions::ConstructL() |
|
109 { |
|
110 // The ConstructL from the base class CEUnitTestSuiteClass must be called. |
|
111 // It generates the test case table. |
|
112 CEUnitTestSuiteClass::ConstructL(); |
|
113 } |
|
114 |
|
115 // METHODS |
|
116 |
|
117 |
|
118 |
|
119 void UT_CMceSipExtensions::SetupL( ) |
|
120 { |
|
121 SIPStrings::OpenL(); |
|
122 iExtensions = CMceSipExtensions::NewL(); |
|
123 } |
|
124 |
|
125 void UT_CMceSipExtensions::Teardown( ) |
|
126 { |
|
127 delete iExtensions; |
|
128 SIPStrings::Close(); |
|
129 } |
|
130 |
|
131 void UT_CMceSipExtensions::UT_CMceSipExtensions_LocalL() |
|
132 { |
|
133 CMceKeyTValuePair<CMceSipExtensions::TLevel>* item = |
|
134 static_cast<CMceKeyTValuePair<CMceSipExtensions::TLevel>*> |
|
135 ( iExtensions->iLocal->Pair( CMceSipExtensions::E100rel ) ); |
|
136 EUNIT_ASSERT( item ); |
|
137 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::E100rel ) |
|
138 == item->Value() ); |
|
139 |
|
140 // remove one item, to test not finding |
|
141 iExtensions->iLocal->Delete( CMceSipExtensions::E100rel ); |
|
142 EUNIT_ASSERT( iExtensions->Local( CMceSipExtensions::E100rel ) == |
|
143 CMceSipExtensions::ENotSupported ); |
|
144 } |
|
145 |
|
146 void UT_CMceSipExtensions::UT_CMceSipExtensions_RemoteL() |
|
147 { |
|
148 CMceKeyTValuePair<CMceSipExtensions::TLevel>* item = |
|
149 static_cast<CMceKeyTValuePair<CMceSipExtensions::TLevel>*> |
|
150 ( iExtensions->iRemote->Pair( CMceSipExtensions::EUpdate ) ); |
|
151 EUNIT_ASSERT( item ); |
|
152 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::EUpdate ) |
|
153 == item->Value() ); |
|
154 |
|
155 // remove one item, to test not finding |
|
156 iExtensions->iRemote->Delete( CMceSipExtensions::E100rel ); |
|
157 EUNIT_ASSERT( iExtensions->Remote( CMceSipExtensions::E100rel ) == |
|
158 CMceSipExtensions::ENotSupported ); |
|
159 } |
|
160 |
|
161 void UT_CMceSipExtensions::UT_CMceSipExtensions_SetLocalL() |
|
162 { |
|
163 CMceKeyTValuePair<CMceSipExtensions::TLevel>* item = |
|
164 static_cast<CMceKeyTValuePair<CMceSipExtensions::TLevel>*> |
|
165 ( iExtensions->iLocal->Pair( CMceSipExtensions::EQosPreconds ) ); |
|
166 EUNIT_ASSERT( item ); |
|
167 item->SetValue( CMceSipExtensions::ENotSupported ); |
|
168 iExtensions->SetLocal( CMceSipExtensions::EQosPreconds, |
|
169 CMceSipExtensions::ERequired ); |
|
170 EUNIT_ASSERT( item->Value() == CMceSipExtensions::ERequired ); |
|
171 |
|
172 // remove one item, to test not finding |
|
173 iExtensions->iLocal->Delete( CMceSipExtensions::E100rel ); |
|
174 iExtensions->SetLocal( CMceSipExtensions::E100rel, |
|
175 CMceSipExtensions::ESupported ); |
|
176 |
|
177 } |
|
178 |
|
179 void UT_CMceSipExtensions::UT_CMceSipExtensions_SetRemoteL() |
|
180 { |
|
181 CMceKeyTValuePair<CMceSipExtensions::TLevel>* item = |
|
182 static_cast<CMceKeyTValuePair<CMceSipExtensions::TLevel>*> |
|
183 ( iExtensions->iRemote->Pair( CMceSipExtensions::E100rel ) ); |
|
184 EUNIT_ASSERT( item ); |
|
185 item->SetValue( CMceSipExtensions::ENotSupported ); |
|
186 iExtensions->SetRemote( CMceSipExtensions::E100rel, |
|
187 CMceSipExtensions::ERequired ); |
|
188 EUNIT_ASSERT( item->Value() == CMceSipExtensions::ERequired ); |
|
189 |
|
190 // remove one item, to test not finding |
|
191 iExtensions->iRemote->Delete( CMceSipExtensions::E100rel ); |
|
192 iExtensions->SetRemote( CMceSipExtensions::E100rel, |
|
193 CMceSipExtensions::ESupported ); |
|
194 } |
|
195 |
|
196 void UT_CMceSipExtensions::UT_CMceSipExtensions_LevelLL() |
|
197 { |
|
198 /* |
|
199 CSIPTransactionBase& aTransaction, |
|
200 CMceSipExtensions::TExtension aExtension ) |
|
201 */ |
|
202 RPointerArray<CSIPHeaderBase> hdrs; |
|
203 CSIPHeaderBase::PushLC( &hdrs ); |
|
204 |
|
205 // no message elements |
|
206 RStringF str = SIPStrings::StringF( SipStrConsts::EInvite ); |
|
207 CSIPTransactionBase* tran = |
|
208 CSIPClientTransaction::NewL( SIPStrings::StringF( SipStrConsts::EInvite ) ); |
|
209 CleanupStack::PushL( tran ); |
|
210 CMceSipExtensions::TLevel result = iExtensions->LevelL( *tran, CMceSipExtensions::E100rel ); |
|
211 EUNIT_ASSERT( result == CMceSipExtensions::ENotSupported ); |
|
212 CleanupStack::PopAndDestroy( tran ); |
|
213 tran = NULL; |
|
214 |
|
215 // 100rel |
|
216 // NOP |
|
217 // no headers |
|
218 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
219 hdrs ); |
|
220 CleanupStack::PushL( tran ); |
|
221 result = iExtensions->LevelL( *tran, CMceSipExtensions::E100rel ); |
|
222 EUNIT_ASSERT( result == CMceSipExtensions::ENotSupported ); |
|
223 CleanupStack::PopAndDestroy( tran ); |
|
224 tran = NULL; |
|
225 |
|
226 // unknown extensions |
|
227 RStringF unknownSuppStr = SIPStrings::Pool().OpenFStringL( KUnKnownSupported ); |
|
228 CleanupClosePushL( unknownSuppStr ); |
|
229 CSIPSupportedHeader* unknownSupp = CSIPSupportedHeader::NewLC( unknownSuppStr ); |
|
230 hdrs.AppendL( unknownSupp ); |
|
231 CleanupStack::Pop( unknownSupp ); |
|
232 CleanupStack::PopAndDestroy(); //unknownSuppStr |
|
233 |
|
234 RStringF unknownReqStr = SIPStrings::Pool().OpenFStringL( KUnKnownRequire ); |
|
235 CleanupClosePushL( unknownReqStr ); |
|
236 CSIPRequireHeader* unknownReq = CSIPRequireHeader::NewLC( unknownReqStr ); |
|
237 hdrs.AppendL( unknownReq ); |
|
238 CleanupStack::Pop( unknownReq ); |
|
239 CleanupStack::PopAndDestroy(); // unknownReqStr |
|
240 |
|
241 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
242 hdrs, |
|
243 KMceSipOK, |
|
244 SipStrConsts::EPhraseOk ); |
|
245 |
|
246 |
|
247 result = iExtensions->LevelL( *tran, CMceSipExtensions::E100rel ); |
|
248 EUNIT_ASSERT( result == CMceSipExtensions::ENotSupported ); |
|
249 CleanupStack::PopAndDestroy( tran ); |
|
250 tran = NULL; |
|
251 |
|
252 // Supported:100rel |
|
253 RStringF supp100RelStr = SIPStrings::Pool().OpenFStringL( KMceSip100Rel ); |
|
254 CleanupClosePushL( supp100RelStr ); |
|
255 CSIPSupportedHeader* supp100Rel = CSIPSupportedHeader::NewLC( supp100RelStr ); |
|
256 hdrs.AppendL( supp100Rel ); |
|
257 CleanupStack::Pop( supp100Rel ); |
|
258 CleanupStack::PopAndDestroy(); // supp100RelStr |
|
259 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
260 hdrs ); |
|
261 |
|
262 CleanupStack::PushL( tran ); |
|
263 result = iExtensions->LevelL( *tran, CMceSipExtensions::E100rel ); |
|
264 EUNIT_ASSERT( result == CMceSipExtensions::ESupported ); |
|
265 CleanupStack::PopAndDestroy( tran ); |
|
266 tran = NULL; |
|
267 |
|
268 // Require:100rel |
|
269 RStringF req100RelStr = SIPStrings::Pool().OpenFStringL( KMceSip100Rel ); |
|
270 CleanupClosePushL( req100RelStr ); |
|
271 CSIPRequireHeader* require = CSIPRequireHeader::NewLC( req100RelStr ); |
|
272 hdrs.AppendL( require ); |
|
273 CleanupStack::Pop( require ); |
|
274 CleanupStack::PopAndDestroy(); // req100RelStr |
|
275 |
|
276 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
277 hdrs, |
|
278 KMceSipOK, |
|
279 SipStrConsts::EPhraseOk ); |
|
280 |
|
281 result = iExtensions->LevelL( *tran, CMceSipExtensions::E100rel ); |
|
282 EUNIT_ASSERT( result == CMceSipExtensions::ERequired ); |
|
283 CleanupStack::PopAndDestroy( tran ); |
|
284 tran = NULL; |
|
285 |
|
286 |
|
287 // EQosPreconds |
|
288 // NOP |
|
289 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
290 hdrs ); |
|
291 CleanupStack::PushL( tran ); |
|
292 result = iExtensions->LevelL( *tran, CMceSipExtensions::EQosPreconds ); |
|
293 EUNIT_ASSERT( result == CMceSipExtensions::ENotSupported ); |
|
294 CleanupStack::PopAndDestroy( tran ); |
|
295 tran = NULL; |
|
296 |
|
297 // Supported |
|
298 RStringF suppQosStr = SIPStrings::Pool().OpenFStringL( KMceSipPrecondition ); |
|
299 CleanupClosePushL( suppQosStr ); |
|
300 CSIPSupportedHeader* suppQos = CSIPSupportedHeader::NewLC( suppQosStr ); |
|
301 hdrs.AppendL( suppQos ); |
|
302 CleanupStack::Pop( suppQos ); |
|
303 CleanupStack::PopAndDestroy(); // suppQosStr |
|
304 |
|
305 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
306 hdrs, |
|
307 KMceSipOK, |
|
308 SipStrConsts::EPhraseOk ); |
|
309 |
|
310 result = iExtensions->LevelL( *tran, CMceSipExtensions::EQosPreconds ); |
|
311 EUNIT_ASSERT( result == CMceSipExtensions::ESupported ); |
|
312 CleanupStack::PopAndDestroy( tran ); |
|
313 tran = NULL; |
|
314 |
|
315 // Required |
|
316 RStringF reqQosStr = SIPStrings::Pool().OpenFStringL( KMceSipPrecondition ); |
|
317 CleanupClosePushL( reqQosStr ); |
|
318 CSIPRequireHeader* reqQos = CSIPRequireHeader::NewLC( reqQosStr ); |
|
319 hdrs.AppendL( reqQos ); |
|
320 CleanupStack::Pop( reqQos ); |
|
321 CleanupStack::PopAndDestroy(); // reqQosStr |
|
322 |
|
323 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
324 hdrs ); |
|
325 CleanupStack::PushL( tran ); |
|
326 result = iExtensions->LevelL( *tran, CMceSipExtensions::EQosPreconds ); |
|
327 EUNIT_ASSERT( result == CMceSipExtensions::ERequired ); |
|
328 CleanupStack::PopAndDestroy( tran ); |
|
329 tran = NULL; |
|
330 |
|
331 // UPDATE |
|
332 // Not supported |
|
333 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
334 hdrs, |
|
335 KMceSipOK, |
|
336 SipStrConsts::EPhraseOk ); |
|
337 result = iExtensions->LevelL( *tran, CMceSipExtensions::EUpdate ); |
|
338 EUNIT_ASSERT( result == CMceSipExtensions::ENotSupported ); |
|
339 CleanupStack::PopAndDestroy( tran ); |
|
340 tran = NULL; |
|
341 |
|
342 // Supported |
|
343 RStringF updateStr = SIPStrings::StringF( SipStrConsts::EUpdate ); |
|
344 CSIPAllowHeader* allowUpdate = CSIPAllowHeader::NewLC( updateStr ); |
|
345 hdrs.AppendL( allowUpdate ); |
|
346 CleanupStack::Pop( allowUpdate ); |
|
347 |
|
348 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
349 hdrs ); |
|
350 |
|
351 CleanupStack::PushL( tran ); |
|
352 result = iExtensions->LevelL( *tran, CMceSipExtensions::EUpdate ); |
|
353 EUNIT_ASSERT( result == CMceSipExtensions::ESupported ); |
|
354 CleanupStack::PopAndDestroy( tran ); |
|
355 tran = NULL; |
|
356 |
|
357 // unknown |
|
358 |
|
359 CMceSipExtensions::TExtension unknown = static_cast< CMceSipExtensions::TExtension >( KErrNotSupported ); |
|
360 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
361 hdrs, |
|
362 KMceSipOK, |
|
363 SipStrConsts::EPhraseOk ); |
|
364 |
|
365 result = iExtensions->LevelL( *tran, unknown ); |
|
366 EUNIT_ASSERT( result == CMceSipExtensions::ENotSupported ); |
|
367 CleanupStack::PopAndDestroy( tran ); |
|
368 tran = NULL; |
|
369 |
|
370 CleanupStack::PopAndDestroy( &hdrs ); |
|
371 } |
|
372 |
|
373 void UT_CMceSipExtensions::UT_CMceSipExtensions_UpdateLL() |
|
374 { |
|
375 // server transaction |
|
376 RPointerArray<CSIPHeaderBase> hdrs; |
|
377 CSIPHeaderBase::PushLC( &hdrs ); |
|
378 |
|
379 // no message elements |
|
380 CSIPServerTransaction* tran = |
|
381 CSIPServerTransaction::NewL( SIPStrings::StringF( SipStrConsts::EInvite ) ); |
|
382 |
|
383 CleanupStack::PushL( tran ); |
|
384 EUNIT_ASSERT_LEAVE( iExtensions->UpdateL( *tran ) ); |
|
385 CleanupStack::PopAndDestroy( tran ); |
|
386 tran = NULL; |
|
387 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
388 CMceSipExtensions::ESupported/*qos*/, |
|
389 CMceSipExtensions::ESupported /*update*/, |
|
390 CMceSipExtensions::ESupported /*allowprack*/, |
|
391 CMceSipExtensions::ESupported /*subscribe*/, |
|
392 CMceSipExtensions::ESupported /*refer*/, |
|
393 CMceSipExtensions::ESupported /*notify*/ ); |
|
394 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
395 CMceSipExtensions::ESupported /*qos*/, |
|
396 CMceSipExtensions::ESupported /*update*/ , |
|
397 CMceSipExtensions::ESupported /*allowprack*/, |
|
398 CMceSipExtensions::ESupported /*subscribe*/, |
|
399 CMceSipExtensions::ESupported /*refer*/, |
|
400 CMceSipExtensions::ESupported /*notify*/ ); |
|
401 |
|
402 // local: 100rel = supported, preconds = supported |
|
403 // remote: 100rel = not supported, preconds not supported |
|
404 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
405 hdrs ); |
|
406 CleanupStack::PushL( tran ); |
|
407 iExtensions->UpdateL( *tran ); |
|
408 CleanupStack::PopAndDestroy( tran ); |
|
409 tran = NULL; |
|
410 |
|
411 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
412 CMceSipExtensions::ESupported/*qos*/, |
|
413 CMceSipExtensions::ESupported /*update*/ , |
|
414 CMceSipExtensions::ESupported /*allowprack*/, |
|
415 CMceSipExtensions::ESupported /*subscribe*/, |
|
416 CMceSipExtensions::ESupported /*refer*/, |
|
417 CMceSipExtensions::ESupported /*notify*/ ); |
|
418 |
|
419 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ENotSupported /*prack*/, |
|
420 CMceSipExtensions::ENotSupported /*qos*/, |
|
421 CMceSipExtensions::ENotSupported /*update*/ , |
|
422 CMceSipExtensions::ENotSupported /*allowprack*/, |
|
423 CMceSipExtensions::ENotSupported /*subscribe*/, |
|
424 CMceSipExtensions::ENotSupported /*refer*/, |
|
425 CMceSipExtensions::ENotSupported /*notify*/ ); |
|
426 |
|
427 // Remote requires 100rel but locally not supported. |
|
428 iExtensions->SetLocal( CMceSipExtensions::E100rel, CMceSipExtensions::ENotSupported ); |
|
429 RStringF req100RelStr = SIPStrings::Pool().OpenFStringL( KMceSip100Rel ); |
|
430 CleanupClosePushL( req100RelStr ); |
|
431 CSIPRequireHeader* req100Rel = CSIPRequireHeader::NewLC( req100RelStr ); |
|
432 hdrs.AppendL( req100Rel ); |
|
433 CleanupStack::Pop( req100Rel ); |
|
434 CleanupStack::PopAndDestroy(); // req100RelStr |
|
435 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
436 hdrs ); |
|
437 CleanupStack::PushL( tran ); |
|
438 |
|
439 EUNIT_ASSERT_LEAVE( iExtensions->UpdateL( *tran ) ); |
|
440 CleanupStack::PopAndDestroy( tran ); |
|
441 tran = NULL; |
|
442 |
|
443 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ENotSupported /*prack*/, |
|
444 CMceSipExtensions::ESupported /*qos*/, |
|
445 CMceSipExtensions::ESupported /*update*/ , |
|
446 CMceSipExtensions::ESupported /*allowprack*/, |
|
447 CMceSipExtensions::ESupported /*subscribe*/, |
|
448 CMceSipExtensions::ESupported /*refer*/, |
|
449 CMceSipExtensions::ESupported /*notify*/ ); |
|
450 MCE_RESET_EXTENSIONS(); |
|
451 |
|
452 // Remote requires qos preconds but locally not supported. |
|
453 iExtensions->SetLocal( CMceSipExtensions::EQosPreconds, CMceSipExtensions::ENotSupported ); |
|
454 RStringF reqQosStr = SIPStrings::Pool().OpenFStringL( KMceSipPrecondition ); |
|
455 CleanupClosePushL( reqQosStr ); |
|
456 CSIPRequireHeader* reqQos = CSIPRequireHeader::NewLC( reqQosStr ); |
|
457 hdrs.AppendL( reqQos ); |
|
458 CleanupStack::Pop( reqQos ); |
|
459 CleanupStack::PopAndDestroy(); // reqQosStr |
|
460 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
461 hdrs ); |
|
462 CleanupStack::PushL( tran ); |
|
463 |
|
464 EUNIT_ASSERT_LEAVE( iExtensions->UpdateL( *tran ) ); |
|
465 CleanupStack::PopAndDestroy( tran ); |
|
466 tran = NULL; |
|
467 |
|
468 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
469 CMceSipExtensions::ENotSupported /*qos*/, |
|
470 CMceSipExtensions::ESupported /*update*/ , |
|
471 CMceSipExtensions::ESupported /*allowprack*/, |
|
472 CMceSipExtensions::ESupported /*subscribe*/, |
|
473 CMceSipExtensions::ESupported /*refer*/, |
|
474 CMceSipExtensions::ESupported /*notify*/ ); |
|
475 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
476 CMceSipExtensions::ESupported /*qos*/, |
|
477 CMceSipExtensions::ESupported /*update*/, |
|
478 CMceSipExtensions::ESupported /*allowprack*/, |
|
479 CMceSipExtensions::ESupported /*subscribe*/, |
|
480 CMceSipExtensions::ESupported /*refer*/, |
|
481 CMceSipExtensions::ESupported /*notify*/ ); |
|
482 |
|
483 MCE_RESET_EXTENSIONS(); |
|
484 |
|
485 // Remote requires 100rel && qos preconds, and allows update |
|
486 RStringF req100RelStr2 = SIPStrings::Pool().OpenFStringL( KMceSip100Rel ); |
|
487 CleanupClosePushL( req100RelStr2 ); |
|
488 CSIPRequireHeader* req100Rel2 = CSIPRequireHeader::NewLC( req100RelStr2 ); |
|
489 hdrs.AppendL( req100Rel2 ); |
|
490 CleanupStack::Pop( req100Rel2 ); |
|
491 CleanupStack::PopAndDestroy(); // req100RelStr2 |
|
492 |
|
493 RStringF reqQosStr2 = SIPStrings::Pool().OpenFStringL( KMceSipPrecondition ); |
|
494 CleanupClosePushL( reqQosStr2 ); |
|
495 CSIPRequireHeader* reqQos2 = CSIPRequireHeader::NewLC( reqQosStr2 ); |
|
496 hdrs.AppendL( reqQos2 ); |
|
497 CleanupStack::Pop( reqQos2 ); |
|
498 CleanupStack::PopAndDestroy(); // reqQosStr2 |
|
499 |
|
500 RStringF updateStr = SIPStrings::StringF( SipStrConsts::EUpdate ); |
|
501 CSIPAllowHeader* allowUpdate = CSIPAllowHeader::NewLC( updateStr ); |
|
502 hdrs.AppendL( allowUpdate ); |
|
503 CleanupStack::Pop( allowUpdate ); |
|
504 |
|
505 tran = MCETestHelper::ServerTransactionL( SipStrConsts::EInvite, |
|
506 hdrs ); |
|
507 CleanupStack::PushL( tran ); |
|
508 |
|
509 iExtensions->UpdateL( *tran ); |
|
510 CleanupStack::PopAndDestroy( tran ); |
|
511 tran = NULL; |
|
512 |
|
513 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ERequired /*prack*/, |
|
514 CMceSipExtensions::ERequired /*qos*/, |
|
515 CMceSipExtensions::ESupported /*update*/ , |
|
516 CMceSipExtensions::ESupported /*allowprack*/, |
|
517 CMceSipExtensions::ESupported /*subscribe*/, |
|
518 CMceSipExtensions::ESupported /*refer*/, |
|
519 CMceSipExtensions::ESupported /*notify*/ ); |
|
520 |
|
521 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ERequired /*prack*/, |
|
522 CMceSipExtensions::ERequired /*qos*/, |
|
523 CMceSipExtensions::ESupported /*update*/ , |
|
524 CMceSipExtensions::ENotSupported /*allowprack*/, |
|
525 CMceSipExtensions::ENotSupported /*subscribe*/, |
|
526 CMceSipExtensions::ENotSupported /*refer*/, |
|
527 CMceSipExtensions::ENotSupported /*notify*/ ); |
|
528 MCE_RESET_EXTENSIONS(); |
|
529 |
|
530 CleanupStack::PopAndDestroy( &hdrs ); |
|
531 } |
|
532 |
|
533 void UT_CMceSipExtensions::UT_CMceSipExtensions_UpdateL2L() |
|
534 { |
|
535 // client transaction |
|
536 RPointerArray<CSIPHeaderBase> hdrs; |
|
537 CSIPHeaderBase::PushLC( &hdrs ); |
|
538 |
|
539 // No message |
|
540 CSIPClientTransaction* tran = |
|
541 CSIPClientTransaction::NewL( SIPStrings::StringF( SipStrConsts::EInvite ) ); |
|
542 EUNIT_ASSERT_LEAVE( iExtensions->UpdateL( *tran ) ); |
|
543 MCE_DELETE( tran ); |
|
544 |
|
545 // NOP -- KMceSipBadRequest |
|
546 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
547 hdrs, |
|
548 KMceSipBadRequest, |
|
549 SipStrConsts::EPhraseBadRequest ); |
|
550 |
|
551 iExtensions->UpdateL( *tran ); |
|
552 CleanupStack::PopAndDestroy( tran ); |
|
553 tran = NULL; |
|
554 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
555 CMceSipExtensions::ESupported /*qos*/, |
|
556 CMceSipExtensions::ESupported /*update*/ , |
|
557 CMceSipExtensions::ESupported /*allowprack*/, |
|
558 CMceSipExtensions::ESupported /*subscribe*/, |
|
559 CMceSipExtensions::ESupported /*refer*/, |
|
560 CMceSipExtensions::ESupported /*notify*/ ); |
|
561 |
|
562 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
563 CMceSipExtensions::ESupported /*qos*/, |
|
564 CMceSipExtensions::ESupported /*update*/ , |
|
565 CMceSipExtensions::ESupported /*allowprack*/, |
|
566 CMceSipExtensions::ESupported /*subscribe*/, |
|
567 CMceSipExtensions::ESupported /*refer*/, |
|
568 CMceSipExtensions::ESupported /*notify*/ ); |
|
569 MCE_RESET_EXTENSIONS(); |
|
570 |
|
571 // 1xx UPDATE not allowed |
|
572 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
573 hdrs, |
|
574 KMceSipRinging, |
|
575 SipStrConsts::EPhraseRinging ); |
|
576 |
|
577 iExtensions->UpdateL( *tran ); |
|
578 CleanupStack::PopAndDestroy( tran ); |
|
579 tran = NULL; |
|
580 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
581 CMceSipExtensions::ESupported /*qos*/, |
|
582 CMceSipExtensions::ESupported /*update*/ , |
|
583 CMceSipExtensions::ESupported /*allowprack*/, |
|
584 CMceSipExtensions::ESupported /*subscribe*/, |
|
585 CMceSipExtensions::ESupported /*refer*/, |
|
586 CMceSipExtensions::ESupported /*notify*/ ); |
|
587 |
|
588 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
589 CMceSipExtensions::ESupported /*qos*/, |
|
590 CMceSipExtensions::ENotSupported /*update*/ , |
|
591 CMceSipExtensions::ENotSupported /*allowprack*/, |
|
592 CMceSipExtensions::ENotSupported /*subscribe*/, |
|
593 CMceSipExtensions::ENotSupported /*refer*/, |
|
594 CMceSipExtensions::ENotSupported /*notify*/ ); |
|
595 MCE_RESET_EXTENSIONS(); |
|
596 |
|
597 // 1xx, 100rel locally required, but not in 1xx |
|
598 iExtensions->SetLocal( CMceSipExtensions::E100rel, CMceSipExtensions::ERequired ); |
|
599 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
600 hdrs, |
|
601 KMceSipRinging, |
|
602 SipStrConsts::EPhraseRinging ); |
|
603 |
|
604 EUNIT_ASSERT_LEAVE( iExtensions->UpdateL( *tran ) ); |
|
605 CleanupStack::PopAndDestroy( tran ); |
|
606 tran = NULL; |
|
607 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ERequired /*prack*/, |
|
608 CMceSipExtensions::ESupported /*qos*/, |
|
609 CMceSipExtensions::ESupported /*update*/ , |
|
610 CMceSipExtensions::ESupported /*allowprack*/, |
|
611 CMceSipExtensions::ESupported /*subscribe*/, |
|
612 CMceSipExtensions::ESupported /*refer*/, |
|
613 CMceSipExtensions::ESupported /*notify*/ ); |
|
614 |
|
615 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
616 CMceSipExtensions::ESupported /*qos*/, |
|
617 CMceSipExtensions::ESupported /*update*/ , |
|
618 CMceSipExtensions::ESupported /*allowprack*/, |
|
619 CMceSipExtensions::ESupported /*subscribe*/, |
|
620 CMceSipExtensions::ESupported /*refer*/, |
|
621 CMceSipExtensions::ESupported /*notify*/ ); |
|
622 MCE_RESET_EXTENSIONS(); |
|
623 |
|
624 // 2xx UPDATE allowed |
|
625 RStringF update = SIPStrings::StringF( SipStrConsts::EUpdate ); |
|
626 CSIPAllowHeader* allowUpdate = CSIPAllowHeader::NewLC( update ); |
|
627 hdrs.AppendL( allowUpdate ); |
|
628 CleanupStack::Pop( allowUpdate ); |
|
629 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
630 hdrs, |
|
631 KMceSipOK, |
|
632 SipStrConsts::EPhraseOk ); |
|
633 |
|
634 iExtensions->UpdateL( *tran ); |
|
635 CleanupStack::PopAndDestroy( tran ); |
|
636 tran = NULL; |
|
637 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
638 CMceSipExtensions::ESupported /*qos*/, |
|
639 CMceSipExtensions::ESupported /*update*/ , |
|
640 CMceSipExtensions::ESupported /*allowprack*/, |
|
641 CMceSipExtensions::ESupported /*subscribe*/, |
|
642 CMceSipExtensions::ESupported /*refer*/, |
|
643 CMceSipExtensions::ESupported /*notify*/ ); |
|
644 |
|
645 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
646 CMceSipExtensions::ESupported /*qos*/, |
|
647 CMceSipExtensions::ESupported /*update*/ , |
|
648 CMceSipExtensions::ENotSupported /*allowprack*/, |
|
649 CMceSipExtensions::ENotSupported /*subscribe*/, |
|
650 CMceSipExtensions::ENotSupported /*refer*/, |
|
651 CMceSipExtensions::ENotSupported /*notify*/ ); |
|
652 MCE_RESET_EXTENSIONS(); |
|
653 |
|
654 |
|
655 // KMceSipExtensionRequired, no preconds required |
|
656 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
657 hdrs, |
|
658 KMceSipExtensionRequired, |
|
659 SipStrConsts::EPhraseExtensionRequired ); |
|
660 // There will leave when don't have require header field. |
|
661 EUNIT_ASSERT_LEAVE( iExtensions->UpdateL( *tran ) ); |
|
662 CleanupStack::PopAndDestroy( tran ); |
|
663 tran = NULL; |
|
664 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
665 CMceSipExtensions::ESupported /*qos*/, |
|
666 CMceSipExtensions::ESupported /*update*/ , |
|
667 CMceSipExtensions::ESupported /*allowprack*/, |
|
668 CMceSipExtensions::ESupported /*subscribe*/, |
|
669 CMceSipExtensions::ESupported /*refer*/, |
|
670 CMceSipExtensions::ESupported /*notify*/ ); |
|
671 |
|
672 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
673 CMceSipExtensions::ESupported /*qos*/, |
|
674 CMceSipExtensions::ESupported /*update*/ , |
|
675 CMceSipExtensions::ESupported /*allowprack*/, |
|
676 CMceSipExtensions::ESupported /*subscribe*/, |
|
677 CMceSipExtensions::ESupported /*refer*/, |
|
678 CMceSipExtensions::ESupported /*notify*/ ); |
|
679 MCE_RESET_EXTENSIONS(); |
|
680 |
|
681 // KMceSipExtensionRequired, preconds required, locally supported |
|
682 RStringF reqQosStr = SIPStrings::Pool().OpenFStringL( KMceSipPrecondition ); |
|
683 CleanupClosePushL( reqQosStr ); |
|
684 CSIPRequireHeader* reqQos = CSIPRequireHeader::NewLC( reqQosStr ); |
|
685 hdrs.AppendL( reqQos ); |
|
686 CleanupStack::Pop( reqQos ); |
|
687 CleanupStack::PopAndDestroy(); // reqQosStr |
|
688 |
|
689 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
690 hdrs, |
|
691 KMceSipExtensionRequired, |
|
692 SipStrConsts::EPhraseExtensionRequired ); |
|
693 |
|
694 iExtensions->UpdateL( *tran ); |
|
695 CleanupStack::PopAndDestroy( tran ); |
|
696 tran = NULL; |
|
697 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
698 CMceSipExtensions::ERequired /*qos*/, |
|
699 CMceSipExtensions::ESupported /*update*/ , |
|
700 CMceSipExtensions::ESupported /*allowprack*/, |
|
701 CMceSipExtensions::ESupported /*subscribe*/, |
|
702 CMceSipExtensions::ESupported /*refer*/, |
|
703 CMceSipExtensions::ESupported /*notify*/ ); |
|
704 |
|
705 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
706 CMceSipExtensions::ESupported /*qos*/, |
|
707 CMceSipExtensions::ESupported /*update*/ , |
|
708 CMceSipExtensions::ESupported /*allowprack*/, |
|
709 CMceSipExtensions::ESupported /*subscribe*/, |
|
710 CMceSipExtensions::ESupported /*refer*/, |
|
711 CMceSipExtensions::ESupported /*notify*/ ); |
|
712 MCE_RESET_EXTENSIONS(); |
|
713 |
|
714 // KMceSipExtensionRequired, preconds required, locally supported |
|
715 iExtensions->SetLocal( CMceSipExtensions::EQosPreconds, CMceSipExtensions::ENotSupported ); |
|
716 iExtensions->SetLocal( CMceSipExtensions::ESecPreconds, CMceSipExtensions::ENotSupported ); |
|
717 RStringF reqQosStr2 = SIPStrings::Pool().OpenFStringL( KMceSipPrecondition ); |
|
718 CleanupClosePushL( reqQosStr2 ); |
|
719 CSIPRequireHeader* reqQos2 = CSIPRequireHeader::NewLC( reqQosStr2 ); |
|
720 hdrs.AppendL( reqQos2 ); |
|
721 CleanupStack::Pop( reqQos2 ); |
|
722 CleanupStack::PopAndDestroy(); // reqQosStr2 |
|
723 |
|
724 tran = MCETestHelper::ClientTransactionLC( SipStrConsts::EInvite, |
|
725 hdrs, |
|
726 KMceSipExtensionRequired, |
|
727 SipStrConsts::EPhraseExtensionRequired ); |
|
728 |
|
729 EUNIT_ASSERT_LEAVE( iExtensions->UpdateL( *tran ) ); |
|
730 CleanupStack::PopAndDestroy( tran ); |
|
731 tran = NULL; |
|
732 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
733 CMceSipExtensions::ENotSupported /*qos*/, |
|
734 CMceSipExtensions::ESupported /*update*/ , |
|
735 CMceSipExtensions::ESupported /*allowprack*/, |
|
736 CMceSipExtensions::ESupported /*subscribe*/, |
|
737 CMceSipExtensions::ESupported /*refer*/, |
|
738 CMceSipExtensions::ESupported /*notify*/ ); |
|
739 |
|
740 MCE_ASSERT_REMOTE_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
741 CMceSipExtensions::ESupported /*qos*/, |
|
742 CMceSipExtensions::ESupported /*update*/ , |
|
743 CMceSipExtensions::ESupported /*allowprack*/, |
|
744 CMceSipExtensions::ESupported /*subscribe*/, |
|
745 CMceSipExtensions::ESupported /*refer*/, |
|
746 CMceSipExtensions::ESupported /*notify*/ ); |
|
747 MCE_RESET_EXTENSIONS(); |
|
748 |
|
749 CleanupStack::PopAndDestroy( &hdrs ); |
|
750 } |
|
751 |
|
752 void UT_CMceSipExtensions::UT_CMceSipExtensions_RemoteIMSRel5L() |
|
753 { |
|
754 iExtensions->SetLocal( CMceSipExtensions::EQosPreconds, CMceSipExtensions::ENotSupported ); |
|
755 EUNIT_ASSERT( !iExtensions->RemoteIMSRel5() ); |
|
756 |
|
757 iExtensions->SetLocal( CMceSipExtensions::EQosPreconds, CMceSipExtensions::ESupported ); |
|
758 EUNIT_ASSERT( !iExtensions->RemoteIMSRel5() ); |
|
759 |
|
760 iExtensions->SetLocal( CMceSipExtensions::EQosPreconds, CMceSipExtensions::ERequired ); |
|
761 EUNIT_ASSERT( iExtensions->RemoteIMSRel5() ); |
|
762 } |
|
763 |
|
764 void UT_CMceSipExtensions::UT_CMceSipExtensions_UpdateL() |
|
765 { |
|
766 /* |
|
767 TMceSessionModifier aModifier, |
|
768 TUint aValue |
|
769 */ |
|
770 // KMcePreconditions |
|
771 // KMcePreconditionsSupported |
|
772 iExtensions->Update( KMcePreconditions, KMcePreconditionsSupported ); |
|
773 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
774 CMceSipExtensions::ESupported /*qos*/, |
|
775 CMceSipExtensions::ESupported /*update*/ , |
|
776 CMceSipExtensions::ESupported /*allowprack*/, |
|
777 CMceSipExtensions::ESupported /*subscribe*/, |
|
778 CMceSipExtensions::ESupported /*refer*/, |
|
779 CMceSipExtensions::ESupported /*notify*/ ); |
|
780 |
|
781 // KMcePreconditions |
|
782 // KMcePreconditionsNotUsed |
|
783 iExtensions->Update( KMcePreconditions, KMcePreconditionsNotUsed ); |
|
784 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
785 CMceSipExtensions::ENotSupported /*qos*/, |
|
786 CMceSipExtensions::ESupported /*update*/ , |
|
787 CMceSipExtensions::ESupported /*allowprack*/, |
|
788 CMceSipExtensions::ESupported /*subscribe*/, |
|
789 CMceSipExtensions::ESupported /*refer*/, |
|
790 CMceSipExtensions::ESupported /*notify*/ ); |
|
791 MCE_RESET_EXTENSIONS(); |
|
792 |
|
793 // KMcePreconditions |
|
794 // Unknown |
|
795 iExtensions->Update( KMcePreconditions, ( TUint )( KErrNotFound ) ); |
|
796 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
797 CMceSipExtensions::ESupported /*qos*/, |
|
798 CMceSipExtensions::ESupported /*update*/ , |
|
799 CMceSipExtensions::ESupported /*allowprack*/, |
|
800 CMceSipExtensions::ESupported /*subscribe*/, |
|
801 CMceSipExtensions::ESupported /*refer*/, |
|
802 CMceSipExtensions::ESupported /*notify*/ ); |
|
803 |
|
804 // KMce100Rel |
|
805 // KMcePreconditionsSupported |
|
806 iExtensions->Update( KMce100Rel, KMcePreconditionsSupported ); |
|
807 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
808 CMceSipExtensions::ESupported /*qos*/, |
|
809 CMceSipExtensions::ESupported /*update*/ , |
|
810 CMceSipExtensions::ESupported /*allowprack*/, |
|
811 CMceSipExtensions::ESupported /*subscribe*/, |
|
812 CMceSipExtensions::ESupported /*refer*/, |
|
813 CMceSipExtensions::ESupported /*notify*/ ); |
|
814 |
|
815 // KMce100Rel |
|
816 // KMcePreconditionsNotUsed |
|
817 iExtensions->Update( KMce100Rel, KMcePreconditionsNotUsed ); |
|
818 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ENotSupported /*prack*/, |
|
819 CMceSipExtensions::ESupported /*qos*/, |
|
820 CMceSipExtensions::ESupported /*update*/ , |
|
821 CMceSipExtensions::ESupported /*allowprack*/, |
|
822 CMceSipExtensions::ESupported /*subscribe*/, |
|
823 CMceSipExtensions::ESupported /*refer*/, |
|
824 CMceSipExtensions::ESupported /*notify*/ ); |
|
825 MCE_RESET_EXTENSIONS(); |
|
826 |
|
827 // KMce100Rel |
|
828 // Unknown |
|
829 iExtensions->Update( KMce100Rel, ( TUint )( KErrNotFound ) ); |
|
830 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
831 CMceSipExtensions::ESupported /*qos*/, |
|
832 CMceSipExtensions::ESupported /*update*/ , |
|
833 CMceSipExtensions::ESupported /*allowprack*/, |
|
834 CMceSipExtensions::ESupported /*subscribe*/, |
|
835 CMceSipExtensions::ESupported /*refer*/, |
|
836 CMceSipExtensions::ESupported /*notify*/ ); |
|
837 |
|
838 // default |
|
839 iExtensions->Update( ( TMceSessionModifier )( KErrNotFound ), |
|
840 ( TUint )( KErrNotFound ) ); |
|
841 MCE_ASSERT_LOCAL_EXTENSIONS( CMceSipExtensions::ESupported /*prack*/, |
|
842 CMceSipExtensions::ESupported /*qos*/, |
|
843 CMceSipExtensions::ESupported /*update*/ , |
|
844 CMceSipExtensions::ESupported /*allowprack*/, |
|
845 CMceSipExtensions::ESupported /*subscribe*/, |
|
846 CMceSipExtensions::ESupported /*refer*/, |
|
847 CMceSipExtensions::ESupported /*notify*/ ); |
|
848 } |
|
849 |
|
850 |
|
851 // TEST TABLE |
|
852 |
|
853 EUNIT_BEGIN_TEST_TABLE( |
|
854 UT_CMceSipExtensions, |
|
855 "UT_CMceSipExtensions", |
|
856 "UNIT" ) |
|
857 |
|
858 EUNIT_TEST( |
|
859 "Local - method ", |
|
860 "CMceSipExtensions", |
|
861 "Local", |
|
862 "FUNCTIONALITY", |
|
863 SetupL, UT_CMceSipExtensions_LocalL, Teardown) |
|
864 |
|
865 EUNIT_TEST( |
|
866 "Remote - method ", |
|
867 "CMceSipExtensions", |
|
868 "Remote", |
|
869 "FUNCTIONALITY", |
|
870 SetupL, UT_CMceSipExtensions_RemoteL, Teardown) |
|
871 |
|
872 EUNIT_TEST( |
|
873 "SetLocal - method ", |
|
874 "CMceSipExtensions", |
|
875 "SetLocal", |
|
876 "FUNCTIONALITY", |
|
877 SetupL, UT_CMceSipExtensions_SetLocalL, Teardown) |
|
878 |
|
879 EUNIT_TEST( |
|
880 "SetRemote - method ", |
|
881 "CMceSipExtensions", |
|
882 "SetRemote", |
|
883 "FUNCTIONALITY", |
|
884 SetupL, UT_CMceSipExtensions_SetRemoteL, Teardown) |
|
885 |
|
886 EUNIT_TEST( |
|
887 "Level - method ", |
|
888 "CMceSipExtensions", |
|
889 "Level", |
|
890 "FUNCTIONALITY", |
|
891 SetupL, UT_CMceSipExtensions_LevelLL, Teardown) |
|
892 |
|
893 EUNIT_TEST( |
|
894 "UpdateL - method, sta ", |
|
895 "CMceSipExtensions", |
|
896 "UpdateL", |
|
897 "FUNCTIONALITY", |
|
898 SetupL, UT_CMceSipExtensions_UpdateLL, Teardown) |
|
899 |
|
900 EUNIT_TEST( |
|
901 "UpdateL - method, cta ", |
|
902 "CMceSipExtensions", |
|
903 "UpdateL", |
|
904 "FUNCTIONALITY", |
|
905 SetupL, UT_CMceSipExtensions_UpdateL2L, Teardown) |
|
906 |
|
907 EUNIT_TEST( |
|
908 "RemoteIMSRel5 - method ", |
|
909 "CMceSipExtensions", |
|
910 "RemoteIMSRel5", |
|
911 "FUNCTIONALITY", |
|
912 SetupL, UT_CMceSipExtensions_RemoteIMSRel5L, Teardown) |
|
913 |
|
914 EUNIT_TEST( |
|
915 "Update - method, session modifier ", |
|
916 "CMceSipExtensions", |
|
917 "Update", |
|
918 "FUNCTIONALITY", |
|
919 SetupL, UT_CMceSipExtensions_UpdateL, Teardown) |
|
920 |
|
921 |
|
922 EUNIT_END_TEST_TABLE |
|
923 |
|
924 // END OF FILE |