phoneapp/phoneuistates/tsrc/ut_cphoneconferenceandwaiting/Src/ut_cphoneconferenceandwaiting.cpp
changeset 78 baacf668fe89
parent 76 cfea66083b62
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
    96         SmcDefaultValue<CPhoneMainResourceResolver*>::SetL( iCPhoneMainResourceResolverMock );
    96         SmcDefaultValue<CPhoneMainResourceResolver*>::SetL( iCPhoneMainResourceResolverMock );
    97     
    97     
    98     iViewCmdHandleMock = new CPhoneViewCommandHandleMock();
    98     iViewCmdHandleMock = new CPhoneViewCommandHandleMock();
    99     iStateMachineMock = CPhoneStateMachineGSM::NewL( iViewCmdHandleMock );
    99     iStateMachineMock = CPhoneStateMachineGSM::NewL( iViewCmdHandleMock );
   100     
   100     
   101     iMockContext->ExpectCallL( "TPhoneCmdParamCallStateData::CallId" ).
   101     iMockContext->ExpectCallL( "PhoneCallUtil::CallIdByState" ).
   102         ReturnsL( 2 );
   102         ReturnsL( 2 );
   103     iStateConferenceAndWaiting = CPhoneConferenceAndWaiting::NewL(
   103     iStateConferenceAndWaiting = CPhoneConferenceAndWaiting::NewL(
   104             iStateMachineMock, iViewCmdHandleMock, NULL );
   104             iStateMachineMock, iViewCmdHandleMock, NULL );
   105 
   105 
       
   106     iMockContext->Reset();
   106     }
   107     }
   107 
   108 
   108 void ut_cphoneconferenceandwaiting::Setup_NoRingingCallIdL(  )
   109 void ut_cphoneconferenceandwaiting::Setup_NoRingingCallIdL(  )
   109     {
   110     {
   110     iMockContext->InitializeL();
   111     iMockContext->InitializeL();
   113         SmcDefaultValue<CPhoneMainResourceResolver*>::SetL( iCPhoneMainResourceResolverMock );
   114         SmcDefaultValue<CPhoneMainResourceResolver*>::SetL( iCPhoneMainResourceResolverMock );
   114     
   115     
   115     iViewCmdHandleMock = new CPhoneViewCommandHandleMock();
   116     iViewCmdHandleMock = new CPhoneViewCommandHandleMock();
   116     iStateMachineMock = CPhoneStateMachineGSM::NewL( iViewCmdHandleMock );
   117     iStateMachineMock = CPhoneStateMachineGSM::NewL( iViewCmdHandleMock );
   117     
   118     
   118     iMockContext->ExpectCallL( "TPhoneCmdParamCallStateData::CallId" ).
   119     iMockContext->ExpectCallL( "PhoneCallUtil::CallIdByState" ).
   119         ReturnsL( -1 );
   120         ReturnsL( -1 );
   120     iStateConferenceAndWaiting = CPhoneConferenceAndWaiting::NewL(
   121     iStateConferenceAndWaiting = CPhoneConferenceAndWaiting::NewL(
   121             iStateMachineMock, iViewCmdHandleMock, NULL );
   122             iStateMachineMock, iViewCmdHandleMock, NULL );
       
   123     iMockContext->Reset();
   122     }
   124     }
   123     
   125     
   124 
   126 
   125 void ut_cphoneconferenceandwaiting::Teardown(  )
   127 void ut_cphoneconferenceandwaiting::Teardown(  )
   126     {
   128     {