void UT_CNATFWUNSAFMessage::TestAddAttributeL() { EUNIT_ASSERT(iMsg->iAttributes.Count() == 0); iMsg->AddAttributeL(iAttr); CNATFWUNSAFAttribute* attr = iAttr; iAttr = NULL; EUNIT_ASSERT(iMsg->iAttributes.Count() == 1); //Pointers much match EUNIT_ASSERT(iMsg->iAttributes[0] == attr); }
//Using setter/getter functions void UT_CNATFWUNSAFMessage::TestUnknownMandatoryAttributesL() { EUNIT_ASSERT(!iMsg->HasUnknownMandatoryAttributes()); EUNIT_ASSERT(!iMsg->iUnknownMandatoryAttributes); iMsg->UnknownMandatoryAttributeFound(); EUNIT_ASSERT(iMsg->HasUnknownMandatoryAttributes()); EUNIT_ASSERT(iMsg->iUnknownMandatoryAttributes); iMsg->UnknownMandatoryAttributeFound(); EUNIT_ASSERT(iMsg->HasUnknownMandatoryAttributes()); }
void T_CSPSettingsEngine::T_CSPSettingsEngine_HasVoIPAndVmbxPropertyNameL( ) { RPropertyNameArray names; CleanupClosePushL( names ); EUNIT_ASSERT( !iCSPSettingsEngine->HasVoIPAndVmbxPropertyName( names ) ); names.AppendL( EPropertyUnknown ); names.AppendL( EPropertyVoIPSubServicePluginId ); EUNIT_ASSERT( iCSPSettingsEngine->HasVoIPAndVmbxPropertyName( names ) ); CleanupStack::PopAndDestroy( &names ); }
void UT_CCFContextManager::UT_CCFContextManager_DefineContextL2L( ) { RThread thread; CleanupClosePushL(thread); TUid uid = TUid::Uid( 123 ); // define context 1 static _LIT_SECURITY_POLICY_PASS( alwaysPass ); EUNIT_ASSERT_NO_LEAVE ( iCFContextManagerInterface->DefineContextL( _L("testsource"), _L("testtype"), alwaysPass, alwaysPass, this, uid ) ); // try to redefine EUNIT_ASSERT_NO_LEAVE ( iCFContextManagerInterface->DefineContextL( _L("testsource"), _L("testtype"), alwaysPass, alwaysPass, this, uid ) ); // try to redefine with another UID TUid anotherUid = TUid::Uid( 345 ); EUNIT_ASSERT_LEAVE ( iCFContextManagerInterface->DefineContextL( _L("testsource"), _L("testtype"), alwaysPass, alwaysPass, this, anotherUid ) ); // check that we get the subscribers notification CCFContextSubscription* subscription = CCFContextSubscription::NewLC(); subscription->SetContextSourceL(_L("testsource")); subscription->SetContextTypeL(_L("testtype")); CleanupStack::Pop( subscription ); iSubscribersCalled = EFalse; iExpectedSubscribersSource.Copy(_L("testsource")); iExpectedSubscribersType.Copy(_L("testtype")); // make subscription EUNIT_ASSERT_NO_LEAVE ( iCFContextManagerInterface->SubscribeContextL(subscription, this, thread) ); EUNIT_ASSERT( iSubscribersCalled ); iSubscribersCalled = EFalse; iNoSubscribersCalled = EFalse; EUNIT_ASSERT_NO_LEAVE ( iCFContextManagerInterface->RemoveSubscription( *subscription, *this) ); EUNIT_ASSERT( iNoSubscribersCalled ); CleanupStack::PopAndDestroy( &thread ); }
//Try to delete attribute that doesn't exist in the message void UT_CNATFWUNSAFMessage::TestDeleteAttributeL() { iMsg->AddAttributeL(iAttr); iAttr = NULL; EUNIT_ASSERT(iMsg->iAttributes.Count() == 1); iMsg->DeleteAttribute(CNATFWUNSAFAttribute::EMessageIntegrity); EUNIT_ASSERT(iMsg->iAttributes.Count() == 1); iMsg->DeleteAttribute(CNATFWUNSAFAttribute::EUsername); EUNIT_ASSERT(iMsg->iAttributes.Count() == 1); }
void UT_CMceStateError::UT_CMceStateError_ExitLL() { iSipSession->iBody = CMceComSession::NewL( CMceComSession::EOutSession ); EUNIT_ASSERT ( iSipSession->CurrentState().Id() == KMceStateError ); TMceStateTransitionEvent event1( *iSipSession, EMceMediaError ); iState->ExitL( event1 ); EUNIT_ASSERT ( iSipSession->CurrentState().Id() == KMceStateError ); }
void UT_CNATBindingCRLFRefresher::TestSetRefreshL() { EUNIT_ASSERT(!iRefresher->IsRefreshed()); iRefresher->SetRefresh(ETrue); EUNIT_ASSERT(iRefresher->IsRefreshed()); iRefresher->SetRefresh(ETrue); EUNIT_ASSERT(iRefresher->IsRefreshed()); iRefresher->SetRefresh(EFalse); EUNIT_ASSERT(!iRefresher->IsRefreshed()); iRefresher->SetRefresh(EFalse); EUNIT_ASSERT(!iRefresher->IsRefreshed()); }
// ---------------------------------------------------------------------------- // CMceOutSessionTest::RemainTestL // ---------------------------------------------------------------------------- // void CMceSecureOutSessionTest::RemainTestL() { // inside dialog MCE_CREATE_PROFILE; EUNIT_ASSERT( iStorage->iSessionId == 0 ); CMceEvent* event = CMceOutEvent::NewL( *iManager, *profile, KMceRecipient, KMceEventHeader, 1000 ); CleanupStack::PushL( event ); CMceRefer* refer = CMceOutRefer::NewL( *iManager, *profile, KMceRecipient, KMceReferTo, CMceRefer::EMultipleRefer ); CleanupStack::PushL( refer ); // with event CMceSecureOutSession* outSession1= CMceSecureOutSession::NewL( *event ); CleanupStack::PushL( outSession1 ); EUNIT_ASSERT( outSession1->Profile() == event->ProfileId() ); EUNIT_ASSERT( outSession1->DialogId() == event->DialogId() ); EUNIT_ASSERT( outSession1->Recipient() == event->Recipient() ); EUNIT_ASSERT( outSession1->Originator() == event->Originator() ); // with refer CMceSecureOutSession* outSession2= CMceSecureOutSession::NewL( *refer ); CleanupStack::PushL( outSession2 ); EUNIT_ASSERT( outSession2->Profile() == refer->ProfileId() ); EUNIT_ASSERT( outSession2->DialogId() == refer->DialogId() ); EUNIT_ASSERT( outSession2->Recipient() == refer->Recipient() ); EUNIT_ASSERT( outSession2->Originator() == refer->Originator() ); // leave with not assigned dialog id TUint32 id = refer->DialogId(); refer->iDialogId = KMceNotAssigned; CMceOutSession* outSession3 = NULL; TRAPD( err, outSession3 = CMceOutSession::NewL( *refer ) ); MCE_TEST_HANDLE_ALLOC_FAILURE( err ) EUNIT_ASSERT_EQUALS( err, KErrArgument ); EUNIT_ASSERT( !outSession3 ); // set refer id back refer->iDialogId = id; // clean CleanupStack::Pop( outSession2 ); CleanupStack::Pop( outSession1 ); CleanupStack::Pop( refer ); CleanupStack::Pop( event ); event->iState = CMceEvent::EActive; MCE_TEST_DELETE( event ); MCE_TEST_DELETE( refer ); MCE_TEST_DELETE( outSession1 ); MCE_TEST_DELETE( outSession2 ); MCE_DELETE_PROFILE; }
void UT_CG711PayloadFormatWrite::UT_CG711PayloadFormatWrite_ConfigurePayloadFormatLL( ) { if ( iAlloc ) { EUNIT_ASSERT( ETrue ); } else { TMccCodecInfo codec; codec.iAlgoUsed = ENoAlgoUsed; codec.iBitrate = 6400; codec.iCNFrameSize = 0; codec.iCodecMode = 3; codec.iEnableDTX = 1; codec.iFourCC = 31313747; codec.iFrameSize = 0; codec.iHwFrameTime = 20; codec.iMaxPtime = 200; codec.iPayloadType = 8; codec.iPtime = 20; codec.iRedundancyCount = 0; codec.iRedundantPayload = 0; codec.iComfortNoiseGenerationPt = KPayloadTypeUndefined; TMccCodecInfoBuffer buffer( codec ); EUNIT_ASSERT_NO_LEAVE( iWrite->ConfigurePayloadFormatL( buffer, *iRtpMediaClock ) ); // test updating of values codec.iIsUpdate = ETrue; codec.iPtime = 40; codec.iPayloadType = 0; codec.iComfortNoiseGenerationPt = 13; buffer = codec; iWrite->ConfigurePayloadFormatL( buffer, *iRtpMediaClock ); EUNIT_ASSERT( iWrite->iCInfo.iPtime == 40 ); EUNIT_ASSERT( iWrite->iCInfo.iPayloadType == 0 ); EUNIT_ASSERT( iWrite->iCInfo.iComfortNoiseGenerationPt == 13 ); // test redundancy payload format usage codec.iIsUpdate = EFalse; codec.iAlgoUsed = EGenRedUsed; codec.iRedundancyCount = 1; buffer = codec; CMccRtpDataSink* rtpDataSinkStub = static_cast<CMccRtpDataSink*>(MDataSink::NewSinkL( KRtpDataSink, KNullDesC8 )); CleanupStack::PushL( rtpDataSinkStub ); CMccRedPayloadWrite* redEncoder = CMccRedPayloadWrite::NewL( rtpDataSinkStub ); CleanupStack::PushL( redEncoder ); CG711PayloadFormatWrite* write = CG711PayloadFormatWrite::NewL( redEncoder ); CleanupStack::PushL( write ); EUNIT_ASSERT_NO_LEAVE( write->ConfigurePayloadFormatL( buffer, *iRtpMediaClock ) ); CleanupStack::PopAndDestroy( 3 ); } }
void T_CSPSettingsEngine::T_CSPSettingsEngine_IsFeatureSupportedLL( ) { EUNIT_ASSERT( !iCSPSettingsEngine->IsFeatureSupportedL( ESupportInternetCallFeature, EFalse ) ); EUNIT_ASSERT_LEAVE( iCSPSettingsEngine->IsFeatureSupportedL( ESupportInternetCallFeature, ETrue ) ); EUNIT_ASSERT( !iCSPSettingsEngine->IsFeatureSupportedL( ESupportCallOutFeature, EFalse ) ); EUNIT_ASSERT_LEAVE( iCSPSettingsEngine->IsFeatureSupportedL( ESupportCallOutFeature, ETrue ) ); EUNIT_ASSERT( !iCSPSettingsEngine->IsFeatureSupportedL( ESupportVoIPSSFeature, EFalse ) ); EUNIT_ASSERT_LEAVE( iCSPSettingsEngine->IsFeatureSupportedL( ESupportVoIPSSFeature, ETrue ) ); EUNIT_ASSERT( iCSPSettingsEngine->IsFeatureSupportedL( ESupportVoIPFeature, EFalse ) ); }
void T_CSPSettingsEngine::T_CSPSettingsEngine_DeleteServicePropertiesLL( ) { RPropertyNameArray names; CleanupClosePushL( names ); EUNIT_ASSERT( KErrNone == iCSPSettingsEngine->DeleteServicePropertiesL( 0, names ) ); names.AppendL( EPropertyPCSPluginId ); names.AppendL( ESubPropertyVoIPSettingsId ); EUNIT_ASSERT( KErrNone == iCSPSettingsEngine->DeleteServicePropertiesL( 0, names ) ); CleanupStack::PopAndDestroy( &names ); }
void UT_CNSPPluginStub::UT_CNSPPluginStub_NewSessionLL( ) { EUNIT_ASSERT( iInitializedReceived == 0 ); iNatSessionId = iPlugin->NewSessionL(*this, 6, _L8("stun.nokia.com"), KProtocolInetUdp); if ( iPlugin->iRequestType != CNSPPluginStub::EResolve ) { CActiveScheduler::Start(); } EUNIT_ASSERT( iNatSessionId == iPlugin->iSessionId ); EUNIT_ASSERT( iPlugin->iReservStatus == 0 ); EUNIT_ASSERT( iPlugin->iReservStatus == KDefaultReserveStatus ); EUNIT_ASSERT( iPlugin->iDelay == KDefaultDelay ); }
void T_CSPSettings::T_CSPSettings_DeleteEntryLL( ) { CSPEntry* entry = CSPEntry::NewLC(); User::LeaveIfError( entry->SetServiceName( _L("Nimi") ) ); TInt id = entry->GetServiceId(); EUNIT_ASSERT( KErrNotFound == iCSPSettings->DeleteEntryL( id ) ); iCSPSettings->AddEntryL( *entry ); id = entry->GetServiceId(); EUNIT_ASSERT( KErrNone == iCSPSettings->DeleteEntryL( id ) ); CleanupStack::PopAndDestroy( entry ); }
void UT_CNATFWUNSAFMessage::TestDetachAttributeL() { iMsg->AddAttributeL(iAttr); EUNIT_ASSERT(iMsg->iAttributes.Count() == 1); CNATFWUNSAFAttribute* attr = iAttr; iAttr = NULL; iMsg->DetachAttribute(attr); CleanupStack::PushL(attr); EUNIT_ASSERT(iMsg->iAttributes.Count() == 0); CleanupStack::PopAndDestroy(attr); }
void UT_CMccResourceItem::UT_CMccResourceItem_GetMultiplexerLL( ) { CMccMultiplexer* multiplexer = NULL; EUNIT_ASSERT_SPECIFIC_LEAVE( multiplexer = iItem->GetMultiplexerL(), KErrNotReady ); EUNIT_ASSERT( multiplexer == NULL ); delete iItem; iItem = NULL; iItem = CMccResourceItem::NewL( 0, NULL, iSourceStub, 1, ETrue ); EUNIT_ASSERT_NO_LEAVE(multiplexer = iItem->GetMultiplexerL()); EUNIT_ASSERT( multiplexer != NULL ); }
void UT_CMccResourceItem::UT_CMccResourceItem_UserMatchL( ) { TMccResourceParams param(0,0,0,0,EFalse,0); TMccResourceParams param2(0,0,0,0,EFalse,0); EUNIT_ASSERT(iItem->UserMatch(param, param2)); param.iStreamId = 2; param2.iStreamId = 3; EUNIT_ASSERT(!iItem->UserMatch(param, param2)); }
void UT_CMccResourceItem::UT_CMccResourceItem_UsersInfoLL( ) { TMccResourceParams param(0,0,0,0,EFalse,0); MCC_EUNIT_ASSERT_EQUALS( iItem->IncreaseRefCount( param ), KErrNone ); param.iLinkId = 2; EUNIT_ASSERT( iItem->IncreaseRefCount( param) == KErrNone ); RArray<TMccResourceParams> paramsarray; CleanupClosePushL(paramsarray); iItem->UsersInfoL( paramsarray ); EUNIT_ASSERT( paramsarray.Count() == 2 ); CleanupStack::PopAndDestroy(¶msarray); }
void MT_MProEngAlertToneSeeker::FetchAlertToneListTestL() { iSeeker->FetchAlertToneListL( *iObserver ); MT_CSchedulerUtility::InstanceL()->Start(); EUNIT_ASSERT( iObserver->iNotified ); EUNIT_ASSERT( iObserver->iToneList ); TInt count( iObserver->iToneList->MdcaCount() ); EUNIT_PRINT( _L( "*** Tones: ***" ) ); for( TInt i(0); i<count; ++i ) { TPtrC tone( iObserver->iToneList->MdcaPoint( i ) ); EUNIT_PRINT( _L( "%S" ), &tone ); } }
void T_MProfile::IsSilentTestL() { __UHEAP_MARK; TBool isSilent( iProfile->IsSilent() ); __UHEAP_MARKEND; if( iActiveId == 1 || iActiveId == 4 ) { EUNIT_ASSERT( isSilent ); } else { EUNIT_ASSERT( !isSilent ); } }
void UT_CMceCsReceiverBase::UT_CMceCsReceiverBase_CancelClientReceiveLL() { iReceiver->ClientReadyToReceiveL( RMessage2() ); EUNIT_ASSERT( iReceiver->iClientReadyToReceive ); iReceiver->CancelClientReceiveL(); EUNIT_ASSERT( !iReceiver->iClientReadyToReceive ); iReceiver->iClientReadyToReceive = EFalse; EUNIT_ASSERT_LEAVE( iReceiver->CancelClientReceiveL() ); EUNIT_ASSERT( !iReceiver->iClientReadyToReceive ); }
void UT_CNATTraversalPendingRequest::TestL() { TUint32 requestId1 = 1; TNATTraversalPendingRequest request1(requestId1,this,*this); EUNIT_ASSERT(requestId1 == request1.RequestId()); request1.CompleteRequest(); EUNIT_ASSERT(iLastRequestId == request1.RequestId()); iLastRequestId = 0; TNATTraversalPendingRequest::TimerExpired(&request1); EUNIT_ASSERT(iLastRequestId == request1.RequestId()); EUNIT_ASSERT(iRequestCompletedCalled); TUint32 requestId2 = 2; TNATTraversalPendingRequest request2(requestId2,NULL,*this); // observer NULL iLastRequestId = 0; request2.CompleteRequest(); EUNIT_ASSERT(0 == iLastRequestId); // compare EUNIT_ASSERT(-1 == TNATTraversalPendingRequest::RequestOrder(request1,request2)); EUNIT_ASSERT(1 == TNATTraversalPendingRequest::RequestOrder(request2,request1)); EUNIT_ASSERT(0 == TNATTraversalPendingRequest::RequestOrder(request1,request1)); }
void UT_CFCSession::UT_CFCSession_UpdateSDPLL( ) { // update offer iFCSession->SetPort( KTBCPLocalPort ); HBufC8* aSdptest = KSDPMessage().AllocLC(); CSdpDocument* sdpDocument = CSdpDocument::DecodeL(*aSdptest); CleanupStack::PushL(sdpDocument); RPointerArray<CSdpFmtAttributeField>* atts = new (ELeave) RPointerArray<CSdpFmtAttributeField>(1); CleanupStack::PushL(atts); CSdpFmtAttributeField* fmtatt = CSdpFmtAttributeField::DecodeLC(KFmtAttribute); atts->AppendL(fmtatt); iFCSession->SetFormatAttributeFieldsL(atts); CleanupStack::Pop(fmtatt);//fmtatt CleanupStack::Pop(atts);//atts iFCSession->UpdateSDPL(*sdpDocument); EUNIT_ASSERT(iFCSession->Port()==KTBCPLocalPort); EUNIT_ASSERT(iErr==KTBCPLocalPort); RPointerArray<CSdpMediaField>& mediaDescriptions = sdpDocument->MediaFields(); EUNIT_ASSERT( mediaDescriptions.Count() == 4 ) CSdpMediaField* mediaAnnouncement = NULL; TInt attrCount = 0; for (TInt i=0; !mediaAnnouncement && i < mediaDescriptions.Count(); i++) { mediaAnnouncement = mediaDescriptions[ i ]; if ( mediaAnnouncement->FormatList().Compare( KTBCP ) == 0 ) { attrCount = mediaAnnouncement->FormatAttributeFields().Count(); } else { mediaAnnouncement = NULL; } } EUNIT_ASSERT( mediaAnnouncement ); EUNIT_ASSERT( attrCount == 1 ); CleanupStack::PopAndDestroy(sdpDocument); CleanupStack::PopAndDestroy(aSdptest);//aSdptest }
void UT_CRtpComm::UT_CRtpComm_SetAcceptedFromAddressL( ) { TCreateSessionParams params; TInt err( KErrNone ); TInetAddr rtpAddr; TInetAddr rtcpAddr; iLocalPort = 7777; // this should be changed to an even number by CRtpComm ///////////////////////////////////////////////// // This object will be destroyed below // It is used for testing construction without RTCP on an odd port TRAP( err, iRtpComm = CRtpComm::NewL( iLocalPort, iSocketServ, iConnection, params, *this, ETrue ) ); RTP_EUNIT_ASSERT_EQUALS ( err, KErrNone ); // Check some initial values if ( iLocalPort != 7776 || iRtpComm->iSender[ERTPPort] != NULL || iRtpComm->iSender[ERTCPPort] != NULL || iRtpComm->iReceiver[ERTPPort] != NULL || iRtpComm->iReceiver[ERTCPPort] != NULL ) { EUNIT_ASSERT ( EFalse ); } iLocalPort = 5000; // use default port 5000 TInt result( KErrNone ); TBuf8<5> sendBuf; TBuf8<5> recvBuf; // Test setting a port to an address // Run the method TInetAddr dummyAddr( INET_ADDR( 127, 0, 0, 1 ), 5000 ); iRtpComm->RegisterReceivedNotify( this ); iRtpComm->ConstructReceiverL(EFalse); iRtpComm->SetAcceptedFromAddress( dummyAddr ); EUNIT_ASSERT ( iRtpComm->iReceiver[ERTPPort] ->iRemoteAddr==dummyAddr ); iRtpComm->SetNonRtpObserverFlag(ETrue); }
void T_CSPSettings::T_CSPSettings_FindPropertyLL( ) { CSPProperty* property = CSPProperty::NewLC(); property->SetName( EPropertyVoIPSubServicePluginId ); TInt profId( 15 ); User::LeaveIfError( property->SetValue( profId )); EUNIT_ASSERT( KErrNotFound == iCSPSettings->FindPropertyL( 0, EPropertyVoIPSubServicePluginId, *property ) ); EUNIT_ASSERT( KErrNone == iCSPSettings->FindPropertyL( profId, EPropertyVoIPSubServicePluginId, *property ) ); CleanupStack::PopAndDestroy( property ); }
void T_CSPSettings::T_CSPSettings_FindServiceNamesLL( ) { RIdArray ids; CleanupClosePushL( ids ); iCSPSettings->FindServiceIdsL( ids ); CDesCArrayFlat* names = new ( ELeave ) CDesCArrayFlat( 10 ); CleanupStack::PushL( names ); EUNIT_ASSERT( KErrNone == iCSPSettings->FindServiceNamesL( ids, *names ) ); TInt count = names->MdcaCount(); EUNIT_ASSERT( count ); CleanupStack::PopAndDestroy( names ); CleanupStack::PopAndDestroy( &ids ); }
// ----------------------------------------------------------------------------- // UT_CQwertyKeyMap::UT_GetNumericLimitsLongValueL // Input string has more than maximum characters // ----------------------------------------------------------------------------- // void UT_CQwertyKeyMap::UT_GetNumericLimitsLongValueL() { QString lowerLimit; QString upperLimit; // "aaqqsswwddee" => "ee" is ignored, rest are as binary: // 001010 001010 000000 000000 001011 001011 000001 000001 001100 001100 // = // 0010 1000 1010 0000 0000 0000 0010 1100 1011 0000 0100 0001 0011 0000 1100 // as hex = 28A0002CB04130C, as decimal = 182958746857902860 TInt err = iKeyMap->GetNumericLimits("aaqqsswwddee", lowerLimit, upperLimit); QString expectedLowerLimit("182958746857902859"); QString expectedUpperLimit("182958746857902861"); EUNIT_ASSERT(lowerLimit == expectedLowerLimit); EUNIT_ASSERT(upperLimit == expectedUpperLimit); }
void ut_remotepartyinfo::TestComparisonOperatorNoMatchL() { _LIT( KMatchedName, "Mr Smith" ); _LIT( KNameFromNetwork, "John Smith" ); _LIT( KCompanyName, "Nokia" ); _LIT( KAddress, "555555" ); iInfo->SetMatchedNameL( KMatchedName ); iInfo->SetNameFromNetworkL(KNameFromNetwork); iInfo->SetCompanyNameL(KCompanyName); iInfo->SetAddressL( KAddress ); iInfo->SetCallIndex( 1 ); iInfo->SetRemoteIdentity( MCallRemotePartyInfo::ERemoteIdentityAvailable ); CCallRemotePartyInfo* duplicatedInfo = CCallRemotePartyInfo::NewLC(); _LIT( KMatchedName2, "Mr Smith" ); _LIT( KNameFromNetwork2, "Jack Smith" ); _LIT( KCompanyName2, "Nokia" ); _LIT( KAddress2, "555555" ); duplicatedInfo->SetMatchedNameL( KMatchedName2 ); duplicatedInfo->SetNameFromNetworkL( KNameFromNetwork2 ); duplicatedInfo->SetCompanyNameL( KCompanyName2 ); duplicatedInfo->SetAddressL( KAddress2 ); duplicatedInfo->SetCallIndex( 1 ); duplicatedInfo->SetRemoteIdentity( MCallRemotePartyInfo::ERemoteIdentityAvailable ); EUNIT_ASSERT( (*iInfo == *duplicatedInfo) == EFalse ); CleanupStack::PopAndDestroy(duplicatedInfo); }
// // Tests // // void EntryL(); // // void UT_TMceStartingAnswererStreams::UT_TMceStartingAnswererStreams_EntryLL() { iState->EntryL(); EUNIT_ASSERT( iMcc->iActions[ 0 ].iAction == CMccControllerStub::ENone ); }
void UT_CIceConnectionHandler::UT_CNATFWConnectionHandler_IncomingMessageLL( ) { TInetAddr localAddr( KLocalAddr ); TInetAddr fromAddr( KRemoteAddr ); TInetAddr peerAddr( KRemoteAddr ); _LIT8( KDummyContent, "dummycontent" ); TBool consumed( EFalse ); // no connection EUNIT_ASSERT_LEAVE( iConnectionHandler->IncomingMessageL( iStreamId, KDummyContent, localAddr, fromAddr, peerAddr, consumed ) ); TUint stunConnection = iConnectionHandler->CreateConnectionL( *iPairs[0] ); // unknown sream EUNIT_ASSERT_NO_LEAVE( iConnectionHandler->IncomingMessageL( iStreamId + 1, KDummyContent, localAddr, fromAddr, peerAddr, consumed ) ); EUNIT_ASSERT( !consumed ); // known stream TUint stunConnection2 = iConnectionHandler->CreateConnectionL( *iPairs[0] ); EUNIT_ASSERT_NO_LEAVE( iConnectionHandler->IncomingMessageL( iStreamId, KDummyContent, localAddr, fromAddr, peerAddr, consumed ) ); iConnectionHandler->RemoveConnection( iStreamId, stunConnection ); iConnectionHandler->RemoveConnection( iStreamId, stunConnection2 ); }
void UT_CMccResourceItem::UT_CMccResourceItem_MatchL( ) { TMccResourceParams param(0,0,0,0,EFalse,0); MCC_EUNIT_ASSERT_EQUALS( iItem->IncreaseRefCount( param ), KErrNone ); EUNIT_ASSERT( iItem->Match(param) ); }