meetingrequest/mrentry/tsrc/ut_mrentry/inc/ut_cesmrmeetingrequestentry.h
branchRCL_3
changeset 33 da5135c61bad
equal deleted inserted replaced
32:a3a1ae9acec6 33:da5135c61bad
       
     1 /*
       
     2 * Copyright (c) 2008-2008 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:  Header file for MR Entry unit and module tests
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef UT_CESMRMeetingRequestEntry_H
       
    20 #define UT_CESMRMeetingRequestEntry_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <CEUnitTestSuiteClass.h>
       
    24 #include <EUnitDecorators.h>
       
    25 #include <cmrutils.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CCalEntry;
       
    29 class CMRMailboxUtils;
       
    30 class CESMRCalDbMgr;
       
    31 class CCalSession;
       
    32 class CActiveSchedulerWait;
       
    33 class CESMRMeetingRequestEntry;
       
    34 
       
    35 // CLASS DEFINITION
       
    36 /**
       
    37  * Generated EUnit test suite class.
       
    38  */
       
    39 NONSHARABLE_CLASS( UT_CESMRMeetingRequestEntry ) : public CEUnitTestSuiteClass, MMRUtilsObserver
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42 
       
    43         static UT_CESMRMeetingRequestEntry* NewL();
       
    44         static UT_CESMRMeetingRequestEntry* NewLC();
       
    45         ~UT_CESMRMeetingRequestEntry();
       
    46         
       
    47     public:
       
    48         void ExecuteL();
       
    49         
       
    50     protected: // From MMRUtilsObserver
       
    51         void HandleCalEngStatus( TMRUtilsCalEngStatus aStatus );
       
    52         void HandleOperation(
       
    53                 TInt aType,
       
    54                 TInt aPercentageCompleted,
       
    55                 TInt aStatus );
       
    56         
       
    57     private: // Constructors
       
    58         UT_CESMRMeetingRequestEntry();
       
    59         void ConstructL();        
       
    60         
       
    61         
       
    62     private: // New methods
       
    63 
       
    64          void SetupL();
       
    65          void Teardown();
       
    66          
       
    67          /**
       
    68           * Utility functions
       
    69           */
       
    70          void CreateCalEntryL();
       
    71          void CreateMREntryL();
       
    72          CCalEntry* CCalEntryL(); //ownership transfered to caller
       
    73          
       
    74          /**
       
    75           * Test functions
       
    76           */
       
    77          void T_Global_CESMRMeetingRequestEntry_NewL();
       
    78          void T_ValidateEntryL_1();
       
    79          void T_ValidateEntryL_2();
       
    80          void T_EntryAttendeeInfoL();
       
    81          void T_GetRecurrenceL();
       
    82          
       
    83     private: //members
       
    84         
       
    85         CESMRMeetingRequestEntry* iMrEntry;
       
    86         CCalEntry* iEntry;
       
    87         CMRMailboxUtils* iMRMailboxUtils;
       
    88         CESMRCalDbMgr* iCalDbMgr;
       
    89         TBool iConflictsExists;
       
    90         CCalSession* iCalSession;
       
    91          
       
    92         /// Own: MR UTILS syncher
       
    93         CActiveSchedulerWait* iCtrlSyncher;
       
    94         /// Own: Operation error value
       
    95         TInt iExecutionError;
       
    96         
       
    97     private: // Data
       
    98        
       
    99         EUNIT_DECLARE_TEST_TABLE;
       
   100 
       
   101     };
       
   102 
       
   103 #endif      //  UT_CESMRMeetingRequestEntry_H