mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallmonitorbase.h
changeset 15 ccd8e69b5392
parent 2 b31261fd4e04
child 20 e8be2c2e049d
child 22 496ad160a278
equal deleted inserted replaced
2:b31261fd4e04 15:ccd8e69b5392
     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 
       
    19 #ifndef __UT_CMusCallMonitorBase_H__
       
    20 #define __UT_CMusCallMonitorBase_H__
       
    21 
       
    22 
       
    23 //  EXTERNAL INCLUDES
       
    24 #include <digia/eunit/ceunittestsuiteclass.h>
       
    25 #include <digia/eunit/eunitmacros.h>
       
    26 #include "etelmm.h"
       
    27 #include "muscallmonitorbase.h"
       
    28 #include "mussesseioninformationapi.h"
       
    29 #include "mmustsypropertyobserver.h"
       
    30 
       
    31 // Forward declaration
       
    32 
       
    33 // Next row is to disable warning emerging from EUnit code.
       
    34 // Placement is due to a fact that most test case files
       
    35 // include this file. Directive can be removed when 
       
    36 // EUnit is fixed.  
       
    37 #pragma warn_illtokenpasting off
       
    38 
       
    39 class CMusCallMonitorMock : public CMusCallMonitorBase
       
    40 							
       
    41     {
       
    42 public:
       
    43     
       
    44     CMusCallMonitorMock( const RMobileCall& aCall,
       
    45     					MMusTsyPropertyObserver& aObserver );
       
    46     ~CMusCallMonitorMock();
       
    47     
       
    48     private:
       
    49 
       
    50     void RunL();
       
    51     void DoCancel();
       
    52     };
       
    53 
       
    54 
       
    55 
       
    56 //  CLASS DEFINITION
       
    57 /**
       
    58  * Tester class for CMusCallMonitorBase. 
       
    59  * 
       
    60  */
       
    61 NONSHARABLE_CLASS( UT_CMusCallMonitorBase ): public CEUnitTestSuiteClass,
       
    62 											MMusTsyPropertyObserver
       
    63     {
       
    64     public:
       
    65         //Two phase construction
       
    66         static UT_CMusCallMonitorBase* NewL();
       
    67         static UT_CMusCallMonitorBase* NewLC();
       
    68         // Destructor                  
       
    69         ~UT_CMusCallMonitorBase();
       
    70         
       
    71     public:    // from MMusTsyPropertyObserver.
       
    72     
       
    73     /**
       
    74      * Notify call state changed
       
    75      * @param aVal The call status
       
    76      * @param aCallName The name of the call
       
    77      */
       
    78     virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal,
       
    79     									 TName& aCallName );
       
    80     
       
    81 
       
    82     private: // Constructor
       
    83         UT_CMusCallMonitorBase();
       
    84         void ConstructL();
       
    85 
       
    86     private: // Test case setup and teardown
       
    87         void SetupL();
       
    88         void Setup2L();
       
    89         
       
    90         void Teardown();
       
    91 
       
    92     private: // Test methdods
       
    93         void UT_SetStateLL();
       
    94         void UT_SetCallInfoLL();
       
    95         void UT_RunErrorL();
       
    96         
       
    97         void UT_SetClirSettingL();
       
    98         void UT_SetTerminatingPrivacyL();
       
    99         void UT_RemovePrefixL();
       
   100         
       
   101     
       
   102     private:    // Data        
       
   103         CMusCallMonitorBase* iCallMonitorBase;
       
   104         RMobileCall iCall;
       
   105 
       
   106         EUNIT_DECLARE_TEST_TABLE;
       
   107 
       
   108     };
       
   109 
       
   110 #endif      //  __UT_CMusCallMonitorBase_H__
       
   111 
       
   112 // End of file