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