phoneapp/phoneuicontrol/tsrc/ut_cphonenumberentrymanager/Src/ut_cphonenumberentrymanager.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_CPHONENUMBERENTRYMANAGER_H__
       
    19 #define __UT_CPHONENUMBERENTRYMANAGER_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <CEUnitTestSuiteClass.h>
       
    23 #include <EUnitDecorators.h>
       
    24 
       
    25 #include "cphonenumberentrymanager.h"
       
    26 #include "mphonecustomization.h"
       
    27 #include "cphonemainresourceresolver.h"
       
    28 #include "TPhoneCmdParamCallHeaderData.h"
       
    29 #include "TPhoneCommandParam.h"
       
    30 #include "CPhoneState.h"
       
    31 #include "CPhoneUiCommandManager.h"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CPhoneViewCommandHandleMock;
       
    35 class CPhoneStateMachineGSM;
       
    36 class CBubbleManager;
       
    37 class CCoeEnv;
       
    38 class CPhoneMainResourceResolverMock;
       
    39 class CSmcMockContext;
       
    40 class CPhoneState;
       
    41 class CPEEngineInfo;
       
    42 
       
    43 // CLASS DEFINITION
       
    44 /**
       
    45  * Generated EUnit test suite class.
       
    46  */
       
    47 NONSHARABLE_CLASS( ut_cphonenumberentrymanager )
       
    48 	: public CEUnitTestSuiteClass
       
    49     {
       
    50     public:  // Constructors and destructor
       
    51 
       
    52         static ut_cphonenumberentrymanager* NewL();
       
    53         static ut_cphonenumberentrymanager* NewLC();
       
    54         ~ut_cphonenumberentrymanager();
       
    55 
       
    56     private: // Constructors
       
    57 
       
    58         ut_cphonenumberentrymanager();
       
    59         void ConstructL();
       
    60 
       
    61     private: // New methods
       
    62 
       
    63          void SetupL();
       
    64          void Teardown();
       
    65          void T_EmptyL();
       
    66          
       
    67          void T_StoreNumberEntryContentAndCheckStoreL();
       
    68          void T_ClearNumberEntryContentCacheL();
       
    69          void T_SetNumberEntryVisibilityL();
       
    70          void T_SetVisibilityIfNumberEntryUsedL();
       
    71          void T_RemoveNumberEntryIfVisibilityIsFalseL();
       
    72          void T_ClearNumberEntryContentCacheIfContentStoredL();
       
    73          void T_CallFromNumberEntryL();
       
    74          void T_PhoneNumberFromEntryLC();
       
    75          void T_NumberEntryClearL();
       
    76          
       
    77     private:
       
    78          
       
    79          void GetNumberEntryCount(
       
    80              TPhoneViewCommandId aCmdId,
       
    81              TPhoneCommandParam* aCommandParam );
       
    82          
       
    83          void GetNumberFromEntry(
       
    84                  TPhoneViewCommandId aCmdId,
       
    85                  TPhoneCommandParam* aCommandParam );
       
    86          
       
    87          void SaveNumberToStoreL();
       
    88         
       
    89     private: // Data
       
    90 
       
    91         CPhoneNumberEntryManager* iCPhoneNumberEntryManager;
       
    92         CPhoneViewCommandHandleMock* iViewCommandHandle;
       
    93         CPhoneStateMachineGSM* iStateMachine;
       
    94         CPhoneState* iPhoneStateMock;
       
    95         CPEEngineInfo* iEngineInfoMock;
       
    96         CPhoneUiCommandManager* iCmdManagerMock;
       
    97         CCoeEnv* iCoeEnvMock;
       
    98         MPhoneCustomization* iCustomization;
       
    99         CSmcMockContext* iMockContext;
       
   100         CPhoneMainResourceResolverMock* iCPhoneMainResourceResolverMock;
       
   101         
       
   102         EUNIT_DECLARE_TEST_TABLE;
       
   103 
       
   104     };
       
   105 
       
   106 #endif      //  __UT_CPHONENUMBERENTRYMANAGER_H__