multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcemediasdpcodec.cpp
branchRCL_3
changeset 18 91f50911ea81
parent 14 5bf83dc720b3
child 25 fb1bbf85a302
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcemediasdpcodec.cpp	Tue May 11 16:34:40 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcemediasdpcodec.cpp	Tue May 25 13:07:26 2010 +0300
@@ -1350,7 +1350,22 @@
 
     }
     
+void UT_CMceMediaSdpCodec::UT_CMceMediaSdpCodec_DecodeSecureSessionLL()
+	{
+	CSdpDocument* sdp = CSdpDocument::DecodeL( KMceTestSdpAMR );
+	CSdpMediaField* audioLine = sdp->MediaFields()[ 0 ];
+    iSession->SecureSessionL();
+    
+    CMceComMediaStream* mediaStream = iSession->Streams()[ 0 ];
+    CMceSecureMediaSession* secureSession = iSession->SecureSession();
 
+    CleanupStack::PushL( sdp );
+    secureSession->iKeyNeedUpdated = EFalse;
+	iSdpCodec->DecodeSecureSessionL(*audioLine, *mediaStream, EMceRoleAnswerer, ETrue );
+	
+	EUNIT_ASSERT( secureSession->iKeyNeedUpdated == ETrue );
+	CleanupStack::PopAndDestroy( sdp );	
+	}
 
 void UT_CMceMediaSdpCodec::UT_CMceMediaSdpCodec_DecodeDirectionLL()
 	{
@@ -1658,11 +1673,17 @@
     "FUNCTIONALITY",
     SetupL, UT_CMceMediaSdpCodec_EncodelocalRtcpAttrLL, Teardown)
     
-
+EUNIT_TEST (
+    "DecodeSecureSessionL test",
+    "CMceMediaSdpCodec",
+    "DecodeSecureSessionL",
+    "FUNCTIONALITY",
+    SetupL, UT_CMceMediaSdpCodec_DecodeSecureSessionLL, Teardown)
+    
 EUNIT_TEST (
     "DecodeDirection test",
     "CMceMediaSdpCodec",
-    "DecodeDirectionAttribute",
+    "DecodeDirectionL",
     "FUNCTIONALITY",
     SetupL, UT_CMceMediaSdpCodec_DecodeDirectionLL, Teardown)