mmsharing/mmshengine/tsrc/ut_engine/inc/musengtestdefs.h
branchRCL_3
changeset 22 73a1feb507fb
parent 0 f0cf47e981f9
child 23 bc78a40cd63c
--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/musengtestdefs.h	Thu Aug 19 09:51:39 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/musengtestdefs.h	Tue Aug 31 15:12:07 2010 +0300
@@ -23,6 +23,7 @@
 #include <mcesession.h>
 #include <mcemanager.h>
 
+#include <digia/eunit/eunitmacros.h>
 // Next row is to disable warning emerging from EUnit code.
 // Placement is due to a fact that most test case files
 // include this file. Directive can be removed when 
@@ -32,12 +33,14 @@
 // Test values
 
 _LIT( KTestRecipientSipUri, "sip:TestRecipient@host.domain" );
+_LIT( KTestRecipient2SipUri, "sip:TestRecipient2@host.domain" );
 _LIT( KTestRecipientSipUriPrefixUpperCase, "SIP:TestRecipient@host.domain" );
 _LIT( KTestRecipientSipUriNoSipPrefix, "TestRecipient@host.domain" );
 _LIT( KTestRecipientTelUri, "tel:+3581111111");
 _LIT( KTestRecipientTelUriNoTelPrefix, "+3581111111" );
 
 _LIT8( KTestRecipientSipUri8, "sip:TestRecipient@host.domain" );
+_LIT8( KTestRecipient2SipUri8, "sip:TestRecipient2@host.domain" );
 _LIT8( KTestRecipientSipUriPrefixUpperCase8, "SIP:TestRecipient@host.domain" );
 _LIT8( KTestRecipientSipUriNoSipPrefix8, "TestRecipient@host.domain" );
 _LIT8( KTestRecipientTelUri8, "tel:+3581111111");
@@ -117,8 +120,11 @@
         User::Leave( error );\
         }
 
+// NOTE! NMusSessionApi::KCategoryUid, NMusSessionApi::KRemoteSipAddress p&s property
+// should contain recipient address to be used for invitation.
+//
 #define ESTABLISH_OUT_SESSION( outSession )\
-    outSession->InviteL( KTestRecipientSipUri );\
+    outSession->EstablishLcSessionL();\
     outSession->iSession->iState = CMceSession::EEstablished;\
     for ( TInt i = 0; i < outSession->iSession->Streams().Count(); ++i )\
             {\
@@ -136,9 +142,31 @@
 #define ESTABLISH_OUT_SESSION_AND_START_STREAMING( outSession )\
     ESTABLISH_OUT_SESSION( outSession );\
     outSession->EnableDisplayL( ETrue );\
-    outSession->PlayL();
-    
+    outSession->LocalVideoPlayer()->LcPlayL();
+
+
+#define MUSENG_EUNIT_ASSERT_EQUALS( func, val ) \
+{\
+TInt musUnitTestRetVal = func;\
+if ( musUnitTestRetVal != KErrNoMemory ){\
+    EUNIT_ASSERT_EQUALS( musUnitTestRetVal, val );\
+    }\
+else{\
+    User::Leave( KErrNoMemory );\
+    }\
+}
+
+#define MUSENG_EUNIT_ASSERT_SPECIFIC_LEAVE( func, val ) \
+{\
+TRAPD( musUnitTestRetVal, func );\
+if ( val != KErrNoMemory && musUnitTestRetVal == KErrNoMemory ){\
+    User::Leave( KErrNoMemory );\
+    }\
+else{\
+    EUNIT_ASSERT_EQUALS( musUnitTestRetVal, val );\
+    }\
+}
     
 #endif // MUSENGTESTDEFS_H
 
- 
\ No newline at end of file
+