idlefw/tsrc/wsplugin/ut_numerickeyhandler/inc/ut_numerickeyhandler.h
branchRCL_3
changeset 111 053c6c7c14f3
equal deleted inserted replaced
110:2c7f27287390 111:053c6c7c14f3
       
     1 /*
       
     2 * Copyright (c) 2004 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 
       
    19 #ifndef _UT_NUMERICKEYHANDLER_H
       
    20 #define _UT_NUMERICKEYHANDLER_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <w32adll.h>
       
    25 #include <e32def.h>
       
    26 #include <digia/eunit/ceunittestsuiteclass.h>
       
    27 
       
    28 // User includes
       
    29 #include "uistate.h"
       
    30 #include "aiwspluginanimdef.h"
       
    31 
       
    32 // Forward declarations
       
    33 class CAnimGeneralFunctionsStub;
       
    34 
       
    35 typedef MAnimGeneralFunctionsWindowExtension::TWindowGroupInfo TIdPlgWindowGroupInfo;
       
    36 
       
    37 namespace AiWsPlugin {
       
    38 
       
    39 class CNumericKeyHandler;
       
    40 
       
    41 // Class declaration
       
    42 NONSHARABLE_CLASS( UT_NumericKeyHandler ) : public CEUnitTestSuiteClass,
       
    43    public MUiState
       
    44    {
       
    45 public:     
       
    46     // Constructors and destructors
       
    47 
       
    48     /**
       
    49      * Two phase construction
       
    50      */
       
    51     static UT_NumericKeyHandler* NewL();
       
    52     static UT_NumericKeyHandler* NewLC();
       
    53     /**
       
    54      * Destructor
       
    55      */
       
    56     ~UT_NumericKeyHandler();
       
    57 
       
    58 private:    
       
    59     // Constructors and destructors
       
    60 
       
    61     UT_NumericKeyHandler();
       
    62     void ConstructL();
       
    63 
       
    64 
       
    65 public: 
       
    66     // From base class MUiState
       
    67     
       
    68     TUint Modifiers() const;
       
    69     TBool HasFocus() const;
       
    70 
       
    71 private:    
       
    72     // New methods
       
    73 
       
    74      void SetupL();
       
    75      
       
    76      void EmptySetupL();
       
    77     
       
    78      void Teardown();
       
    79     
       
    80      void TestNumericKeyCreationL();
       
    81      
       
    82      void TestNumericKeyEventL();
       
    83      
       
    84      void TestFocusChangeL();
       
    85      
       
    86      void TestNumericKeyEventQwertyModeL();
       
    87 
       
    88      void TestHandlerFunctions1L();
       
    89 
       
    90      void TestHandlerFunctions2L();
       
    91 
       
    92      void TestHandlerFunctions3L();
       
    93      
       
    94 private:   
       
    95     // Data
       
    96 
       
    97     EUNIT_DECLARE_TEST_TABLE; 
       
    98     
       
    99     CNumericKeyHandler* iNumericKeyHandler;
       
   100     
       
   101     CAnimGeneralFunctionsStub* iAnimGeneralFunctions;
       
   102       
       
   103     TInt iTestValue;
       
   104     
       
   105     TUint iModifiers;    
       
   106     };
       
   107 }
       
   108 
       
   109 #endif      //  _UT_NUMERICKEYHANDLER_H
       
   110 
       
   111 // End of file