phoneapp/phoneuistates/tsrc/ut_cphonecallsetup/inc/ut_cphonecallsetup.h
changeset 77 2be0b271d017
equal deleted inserted replaced
72:c76a0b1755b9 77:2be0b271d017
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __UT_CPHONECALLSETUP_H__
       
    19 #define __UT_CPHONECALLSETUP_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <CEUnitTestSuiteClass.h>
       
    23 #include <EUnitDecorators.h>
       
    24 
       
    25 #include "cphonecallsetup.h"
       
    26 #include "CPhoneState.h"
       
    27 #include "cphonestatecallsetupstub.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CPhoneViewController;
       
    31 class CPhoneState;
       
    32 class CPhoneStateCallSetup;
       
    33 class TPhoneCmdParamBoolean;
       
    34 class TPhoneCmdParamCallHeaderData;
       
    35 class CPhoneMainResourceResolver;
       
    36 class CPhoneStateMachineStub;
       
    37 
       
    38 // CLASS DEFINITION
       
    39 /**
       
    40  * this class was done to prevent ambigous access to CBase(CPhoneState inherits CBase also).
       
    41  */
       
    42 class CallSetupWrapperClass : public CPhoneCallSetup
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         static CallSetupWrapperClass* NewL(
       
    47                 MPhoneStateMachine* aStateMachine, 
       
    48                 MPhoneViewCommandHandle* aViewCommandHandle,
       
    49                 MPhoneCustomization* aPhoneCustomization );
       
    50         
       
    51         virtual ~CallSetupWrapperClass();
       
    52         
       
    53         void HandleConnectingL( TInt aCallId );
       
    54         
       
    55         
       
    56     protected:
       
    57        CallSetupWrapperClass( MPhoneStateMachine* aStateMachine, 
       
    58                 MPhoneViewCommandHandle* aViewCommandHandle,
       
    59                 MPhoneCustomization* aPhoneCustomization  );
       
    60         
       
    61         virtual void ConstructL();
       
    62     };
       
    63 
       
    64 // CLASS DEFINITION
       
    65 /**
       
    66  * Generated EUnit test suite class.
       
    67  */
       
    68 NONSHARABLE_CLASS( ut_cphonecallsetup )
       
    69     : public CEUnitTestSuiteClass
       
    70     {
       
    71     public:  // Constructors and destructor
       
    72 
       
    73         static ut_cphonecallsetup* NewL();
       
    74         static ut_cphonecallsetup* NewLC();
       
    75         ~ut_cphonecallsetup();
       
    76 
       
    77     private: // Constructors
       
    78 
       
    79         ut_cphonecallsetup();
       
    80         void ConstructL();
       
    81 
       
    82     private: // New methods
       
    83 
       
    84          void SetupL();
       
    85         
       
    86          void Teardown();
       
    87         
       
    88          void T_CPhoneCallSetup__CPhoneCallSetupL();
       
    89         
       
    90          void T_CPhoneCallSetup_HandleHandleConnectingMessageL();
       
    91          
       
    92          TInt VerifyViewCommand( const TInt& aCmd );
       
    93 
       
    94          void VerifyEPhoneViewRemoveGlobalNoteIsNotUsed();
       
    95          
       
    96     private: // Data
       
    97 
       
    98         CPhoneViewController* iViewCommandHandle;
       
    99         CPhoneStateMachineStub* iStateMachine;
       
   100         CPhoneMainResourceResolver* iStubResourceResolver;
       
   101         CallSetupWrapperClass* iWrapper;
       
   102 
       
   103         EUNIT_DECLARE_TEST_TABLE;
       
   104     };
       
   105 
       
   106 #endif      //  __UT_CPHONECALLSETUP_H__