uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestdocandinit/inc/bctestDocAndInitcase.h
changeset 0 2f259fa3e83a
child 10 3d340a0166ff
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2006 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:  test case
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BCTEST_DOCANDINITCASE_H
       
    20 #define BCTEST_DOCANDINITCASE_H
       
    21 
       
    22 #include <documenthandler.h>
       
    23 #include <eikcolib.h>
       
    24 #include <eikctlib.h>
       
    25 #include <aknserverapp.h> 
       
    26 
       
    27 #include "bctestcase.h"
       
    28 
       
    29 class CBCTestDocAndInitContainer;
       
    30 class CCoeControl;
       
    31 class CDocumentHandler;
       
    32 
       
    33 /**
       
    34 * test case for various list classes
       
    35 */
       
    36 class CBCTestDocAndInitCase: public CBCTestCase, public MAknServerAppExitObserver
       
    37     {
       
    38 public: // constructor and destructor
       
    39     
       
    40     /**
       
    41     * Symbian 2nd static constructor
       
    42     */
       
    43     static CBCTestDocAndInitCase* NewL( CBCTestDocAndInitContainer* aContainer );
       
    44     
       
    45     /**
       
    46     * Destructor
       
    47     */
       
    48     virtual ~CBCTestDocAndInitCase();
       
    49     
       
    50 public: // from CBCTestCase
       
    51     
       
    52     /**
       
    53     * Execute corresponding test functions for UI command
       
    54     * @param aCmd, UI command
       
    55     */
       
    56     void RunL( TInt aCmd );
       
    57 
       
    58 protected: // new functions
       
    59     
       
    60     /**
       
    61     * Build autotest script
       
    62     */
       
    63     void BuildScriptL();
       
    64     
       
    65     /**
       
    66      * Create control or allocate resource for test
       
    67      * @param aCmd UI command, maybe you need to do some work 
       
    68      * for different outline
       
    69      */
       
    70     void PrepareCaseL( TInt aCmd );
       
    71     
       
    72     /**
       
    73      * Release resource used in test
       
    74      */
       
    75     void ReleaseCaseL();
       
    76     
       
    77     /**
       
    78      * Test functions
       
    79      */
       
    80     void     TestDocument1L();
       
    81     void     TestDocument2L();
       
    82     void     TestInitializationL();
       
    83     void    TestAppUiFactoryL();
       
    84     void    TestCoCtlLibraryL();
       
    85     void    TestCtlLibraryL();    
       
    86     void Cleanup();
       
    87 private: // constructor
       
    88     
       
    89     /**
       
    90      * C++ default constructor
       
    91      */
       
    92     CBCTestDocAndInitCase( CBCTestDocAndInitContainer* aContainer );
       
    93     
       
    94     /**
       
    95      * Symbian 2nd constructor
       
    96      */
       
    97     void ConstructL();
       
    98 private: // from MAknServerAppExitObserver
       
    99     void HandleServerAppExit( TInt aReason );
       
   100        
       
   101 private: // data
       
   102     
       
   103     /**
       
   104      * Pointer to a control, maybe you need one in your test
       
   105      * own
       
   106      */
       
   107     CCoeControl* iControl;
       
   108 
       
   109     /**
       
   110      * Pointer to container.
       
   111      * not own
       
   112      */
       
   113     CBCTestDocAndInitContainer* iContainer;
       
   114 
       
   115     };
       
   116 
       
   117 #endif // BCTEST_DOCANDINITCASE_H