phoneapp/phoneuistates/tsrc/ut_cphsingleandcallsetupandwait/Src/ut_cphsingleandcallsetupandwait.cpp
changeset 78 baacf668fe89
parent 74 d1c62c765e48
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
    25 #include "CPhoneStateMachineStub.h"
    25 #include "CPhoneStateMachineStub.h"
    26 #include "MPhoneKeyEvents.h"
    26 #include "MPhoneKeyEvents.h"
    27 #include "TPhoneCommandParam.h"
    27 #include "TPhoneCommandParam.h"
    28 #include "CPhoneMainResourceResolver.h"
    28 #include "CPhoneMainResourceResolver.h"
    29 #include "phoneappcommands.hrh"
    29 #include "phoneappcommands.hrh"
       
    30 #include <csmcmockcontext.h>
       
    31 #include <smcdefaultvalue.h>
       
    32 #include <msmcmockspecbuilder.h>
       
    33 #include <smcobjecttotypemapper.h>
       
    34 #include <smcmacros.h>
       
    35 #include <msmcmockaction.h>
    30 
    36 
    31 
    37 
    32 // - Construction -----------------------------------------------------------
    38 // - Construction -----------------------------------------------------------
    33 
    39 
    34 ut_cphsingleandcallsetupandwait* ut_cphsingleandcallsetupandwait::NewL()
    40 ut_cphsingleandcallsetupandwait* ut_cphsingleandcallsetupandwait::NewL()
    46     return self;
    52     return self;
    47     }
    53     }
    48 
    54 
    49 ut_cphsingleandcallsetupandwait::~ut_cphsingleandcallsetupandwait()
    55 ut_cphsingleandcallsetupandwait::~ut_cphsingleandcallsetupandwait()
    50     {
    56     {
       
    57     CSmcMockContext::Release();
    51     }
    58     }
    52 
    59 
    53 ut_cphsingleandcallsetupandwait::ut_cphsingleandcallsetupandwait()
    60 ut_cphsingleandcallsetupandwait::ut_cphsingleandcallsetupandwait()
    54     {
    61     {
    55     }
    62     }
    56 
    63 
    57 void ut_cphsingleandcallsetupandwait::ConstructL()
    64 void ut_cphsingleandcallsetupandwait::ConstructL()
    58     {
    65     {
    59     CEUnitTestSuiteClass::ConstructL();
    66     CEUnitTestSuiteClass::ConstructL();
       
    67     iMockContext = CSmcMockContext::InstanceL();
    60     }
    68     }
    61 
    69 
    62 // - Test methods -----------------------------------------------------------
    70 // - Test methods -----------------------------------------------------------
    63 
    71 
    64 
    72 
    65 
    73 
    66 void ut_cphsingleandcallsetupandwait::SetupL(  )
    74 void ut_cphsingleandcallsetupandwait::SetupL(  )
    67     {
    75     {
       
    76     iMockContext->InitializeL();
    68     iViewCommandHandle = CPhoneViewController::NewL();
    77     iViewCommandHandle = CPhoneViewController::NewL();
    69     iStateMachine = CPhoneStateMachineStub::NewL(); 
    78     iStateMachine = CPhoneStateMachineStub::NewL(); 
    70      
    79      
    71     iStateSingleAndCallSetupAndWaiting  = CPhoneSingleAndCallSetupAndWaiting::NewL(
    80     iStateSingleAndCallSetupAndWaiting  = CPhoneSingleAndCallSetupAndWaiting::NewL(
    72            iStateMachine, iViewCommandHandle, NULL );
    81            iStateMachine, iViewCommandHandle, NULL );
    78     {
    87     {
    79     delete CPhoneMainResourceResolver::Instance();
    88     delete CPhoneMainResourceResolver::Instance();
    80     delete iStateSingleAndCallSetupAndWaiting;
    89     delete iStateSingleAndCallSetupAndWaiting;
    81     delete iViewCommandHandle;
    90     delete iViewCommandHandle;
    82     delete iStateMachine;
    91     delete iStateMachine;
       
    92     iMockContext->Reset();
    83     }
    93     }
    84     
    94     
    85 // -----------------------------------------------------------------------------
    95 // -----------------------------------------------------------------------------
    86 // Test  conference idle
    96 // Test  conference idle
    87 // -check commands
    97 // -check commands