idlefw/tsrc/mcsplugin/ut_mcsplugin/ut_mcspluginhandler.h
branchRCL_3
changeset 28 053c6c7c14f3
equal deleted inserted replaced
27:2c7f27287390 28:053c6c7c14f3
       
     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_MCSPLUGINHANDLER_H__
       
    20 #define __UT_MCSPLUGINHANDLER_H__
       
    21 
       
    22 //  EXTERNAL INCLUDES
       
    23 #include <digia/eunit/ceunittestsuiteclass.h>
       
    24 #include <mcsmenu.h>
       
    25 #include <msvapi.h>
       
    26 
       
    27 //  INTERNAL INCLUDES
       
    28 
       
    29 //  FORWARD DECLARATIONS
       
    30 class CMCSPluginHandler;
       
    31 class CMCSPluginWatcher;
       
    32 
       
    33 #include <e32def.h>
       
    34 #ifndef NONSHARABLE_CLASS
       
    35 #define NONSHARABLE_CLASS(x) class x
       
    36 #endif
       
    37 
       
    38 //  CLASS DEFINITION
       
    39 /**
       
    40  *
       
    41  * Unit test for the mcspluginhandler
       
    42  *
       
    43  */
       
    44 NONSHARABLE_CLASS( UT_McsPluginHandler ) : 
       
    45     public CEUnitTestSuiteClass,
       
    46     public MMsvSessionObserver
       
    47     {
       
    48 public:     // Constructors and destructors
       
    49 
       
    50     /**
       
    51      * Two phase construction
       
    52      */
       
    53     static UT_McsPluginHandler* NewL();
       
    54     static UT_McsPluginHandler* NewLC();
       
    55     /**
       
    56      * Destructor
       
    57      */
       
    58     ~UT_McsPluginHandler();
       
    59 
       
    60 private:    // Constructors and destructors
       
    61 
       
    62     UT_McsPluginHandler();
       
    63     void ConstructL();
       
    64 
       
    65 private:    // New methods
       
    66 
       
    67     void SetupL();
       
    68 
       
    69     void Teardown();
       
    70 
       
    71     /**
       
    72      * Test supported types function for correct output
       
    73      */
       
    74     void SupportedTypesTestL();
       
    75 
       
    76     /**
       
    77      * Tests command handling and spoectial shortcuts launching
       
    78      * functins for basic functionality
       
    79      */
       
    80     void CommandHandlingL();
       
    81     
       
    82     /**
       
    83      * Tests pure shortcut launching
       
    84      */
       
    85     void LaunchShortcutL();
       
    86     
       
    87     /**
       
    88      * Tests launch of a specific shortcut
       
    89      */
       
    90     void LaunchItemL();
       
    91 
       
    92     /**
       
    93      * Tests HandleSessionEvent function
       
    94      */
       
    95     void SessionEventL();
       
    96 
       
    97     /**
       
    98      * From class MMsvSessionObserver,
       
    99      * Handles an event from the message server.
       
   100      */
       
   101     void HandleSessionEventL(
       
   102               TMsvSessionEvent /*aEvent*/, 
       
   103               TAny* /*aArg1*/, 
       
   104               TAny* /*aArg2*/,
       
   105               TAny* /*aArg3*/ );
       
   106 
       
   107 private:    // Data
       
   108 
       
   109     CMCSPluginHandler* iHandler;
       
   110     RMenu iMenu;
       
   111     CMCSPluginWatcher* iWatcher;
       
   112 
       
   113     EUNIT_DECLARE_TEST_TABLE;
       
   114     };
       
   115 
       
   116 #endif      //  __UT_MCSPLUGINHANDLER_H__
       
   117 
       
   118 // End of file