multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_CMCESdpSession.cpp
branchRCL_3
changeset 17 a5ac35ca6d81
parent 11 2a28ef775f15
equal deleted inserted replaced
14:5bf83dc720b3 17:a5ac35ca6d81
  1331     
  1331     
  1332     EUNIT_ASSERT( KMceSipNotAcceptableHere == iSdpSession->DecodeOfferL( *offer3, *iInSession ));
  1332     EUNIT_ASSERT( KMceSipNotAcceptableHere == iSdpSession->DecodeOfferL( *offer3, *iInSession ));
  1333 		
  1333 		
  1334 	CleanupStack::PopAndDestroy( offer3 );						
  1334 	CleanupStack::PopAndDestroy( offer3 );						
  1335     }    
  1335     }    
       
  1336 	
       
  1337 void UT_CMceSdpSession::UT_CMceSdpSession_DecodeOfferL_4L()
       
  1338     {	
       
  1339     iSdpSession->SetMediaSession( iInSession );
       
  1340     iInSession->AttachSDPSessionL( *iSdpSession );
       
  1341     
       
  1342     TInetAddr remoteIP;
       
  1343     remoteIP.SetAddress( INET_ADDR( 10,10,10,10 ) );
       
  1344     
       
  1345     _LIT8( KMyUserName, "username" );
       
  1346     const TInt64 KSessionId( 1234 );
       
  1347     const TInt64 KSessionVersion( 5678 );    
       
  1348     CSdpOriginField* remoteorigin = 
       
  1349             CSdpOriginField::NewL( KMyUserName, KSessionId, KSessionVersion, remoteIP );
       
  1350     iSdpSession->iRemoteOrigin = remoteorigin;
       
  1351 
       
  1352     iSdpSession->iStoreRemoteOrigin = EFalse;
       
  1353     CSdpDocument* offer = CSdpDocument::DecodeL( KMceMMTestSdpMessage_MT_Confield_In_MediaLine );
       
  1354     CleanupStack::PushL( offer );
       
  1355     TInt err = iSdpSession->DecodeOfferL( *offer, *iInSession );
       
  1356     EUNIT_ASSERT( err == KErrNone );
       
  1357     EUNIT_ASSERT( iSdpSession->iRemoteOrigin->InetAddress()->CmpAddr( remoteIP ) );
       
  1358 
       
  1359     iSdpSession->iStoreRemoteOrigin = ETrue;
       
  1360     err = iSdpSession->DecodeOfferL( *offer, *iInSession );
       
  1361     EUNIT_ASSERT( err == KErrNone );
       
  1362     EUNIT_ASSERT( !iSdpSession->iRemoteOrigin->InetAddress()->CmpAddr( remoteIP ) );
       
  1363     CleanupStack::PopAndDestroy( offer ); 
       
  1364     }
  1336 
  1365 
  1337 void UT_CMceSdpSession::UT_CMceSdpSession_DecodeOfferLL_CreateAnswer_NOK_1(  )
  1366 void UT_CMceSdpSession::UT_CMceSdpSession_DecodeOfferLL_CreateAnswer_NOK_1(  )
  1338     {
  1367     {
  1339     iSdpSession->SetMediaSession( iInSession );
  1368     iSdpSession->SetMediaSession( iInSession );
  1340     iInSession->AttachSDPSessionL( *iSdpSession );
  1369     iInSession->AttachSDPSessionL( *iSdpSession );
  2849     "remove media lines - test",
  2878     "remove media lines - test",
  2850     "CMceSdpSession",
  2879     "CMceSdpSession",
  2851     "DecodeOffer3L",
  2880     "DecodeOffer3L",
  2852     "FUNCTIONALITY",
  2881     "FUNCTIONALITY",
  2853     SetupL, UT_CMceSdpSession_DecodeOfferL_3L, Teardown)    
  2882     SetupL, UT_CMceSdpSession_DecodeOfferL_3L, Teardown)    
       
  2883     
       
  2884 EUNIT_TEST(
       
  2885     "iStoreRemoteOrigin - test",
       
  2886     "CMceSdpSession",
       
  2887     "DecodeOffer4L",
       
  2888     "FUNCTIONALITY",
       
  2889     SetupL, UT_CMceSdpSession_DecodeOfferL_4L, Teardown) 
  2854 
  2890 
  2855 EUNIT_TEST(
  2891 EUNIT_TEST(
  2856     "ForkL - test",
  2892     "ForkL - test",
  2857     "CMceSdpSession",
  2893     "CMceSdpSession",
  2858     "ForkL",
  2894     "ForkL",