phoneapp/phoneuistates/tsrc/ut_cphonesingleandwaiting/Src/ut_cphonesingleandwaiting.cpp
changeset 76 cfea66083b62
parent 74 d1c62c765e48
equal deleted inserted replaced
74:d1c62c765e48 76:cfea66083b62
   164 // - Test methods -----------------------------------------------------------
   164 // - Test methods -----------------------------------------------------------
   165 
   165 
   166 void ut_cphonesingleandwaiting::TestBubbleAndUICommandsAreUpdatedWhenCallIsPutToHoldL()
   166 void ut_cphonesingleandwaiting::TestBubbleAndUICommandsAreUpdatedWhenCallIsPutToHoldL()
   167     {
   167     {
   168     TInt callId( 1 );
   168     TInt callId( 1 );
   169     iMockContext->ExpectCallL("CPhoneState::UpdateUiCommands");
   169     iMockContext->ExpectCallL("CPhoneState::UpdateCallHeaderAndUiCommandsL");
   170     iMockContext->ExpectCallL("CPhoneViewCommandHandleMock::ExecuteCommandL").
       
   171         WithL<TPhoneViewCommandId,TInt>(EPhoneViewUpdateBubble, callId);
       
   172     
   170     
   173     iState->HandlePhoneEngineMessageL( MEngineMonitor::EPEMessageHeld, callId );
   171     iState->HandlePhoneEngineMessageL( MEngineMonitor::EPEMessageHeld, callId );
   174     EUNIT_ASSERT_EQUALS( KErrNone, iMockContext->VerifyExpectations() );
   172     EUNIT_ASSERT_EQUALS( KErrNone, iMockContext->VerifyExpectations() );
   175     }
   173     }
   176 
   174 
   177 void ut_cphonesingleandwaiting::TestBubbleAndUICommandsAreUpdatedWhenCallIsResumedL()
   175 void ut_cphonesingleandwaiting::TestBubbleAndUICommandsAreUpdatedWhenCallIsResumedL()
   178     {
   176     {
   179     TInt callId( 0 );
   177     TInt callId( 0 );
   180     iMockContext->ExpectCallL("CPhoneState::UpdateUiCommands");
   178     iMockContext->ExpectCallL("CPhoneState::UpdateCallHeaderAndUiCommandsL");
   181     iMockContext->ExpectCallL("CPhoneViewCommandHandleMock::ExecuteCommandL").
       
   182         WithL<TPhoneViewCommandId,TInt>(EPhoneViewUpdateBubble, callId);
       
   183     
   179     
   184     iState->HandlePhoneEngineMessageL( MEngineMonitor::EPEMessageConnected, callId );
   180     iState->HandlePhoneEngineMessageL( MEngineMonitor::EPEMessageConnected, callId );
   185     EUNIT_ASSERT_EQUALS( KErrNone, iMockContext->VerifyExpectations() );
   181     EUNIT_ASSERT_EQUALS( KErrNone, iMockContext->VerifyExpectations() );
   186     }
   182     }
   187 
   183