mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatorapi.h
changeset 0 f0cf47e981f9
child 22 73a1feb507fb
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Unit tests for CMusIndicatorApi class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef UT_CMUSINDICATORAPI_H
       
    21 #define UT_CMUSINDICATORAPI_H
       
    22 
       
    23 
       
    24 #include "musindicatorobserver.h"
       
    25 #include <digia/eunit/ceunittestsuiteclass.h>
       
    26 #include <e32def.h>
       
    27 
       
    28 
       
    29 #ifndef NONSHARABLE_CLASS
       
    30     #define NONSHARABLE_CLASS(x) class x
       
    31 #endif
       
    32 
       
    33 
       
    34 class CMusIndicatorApi;
       
    35 
       
    36 
       
    37 /**
       
    38  *  Unit test class for CMusIndicatorApi class.
       
    39  *  Implements unit tests for CMusIndicatorApi class.
       
    40  */
       
    41 NONSHARABLE_CLASS( UT_CMusIndicatorApi ) : public
       
    42     CEUnitTestSuiteClass,
       
    43     MMusIndicatorObserver
       
    44     {
       
    45 public:
       
    46 
       
    47     static UT_CMusIndicatorApi* NewL();
       
    48     static UT_CMusIndicatorApi* NewLC();
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     ~UT_CMusIndicatorApi();
       
    54 
       
    55 private:
       
    56 
       
    57     UT_CMusIndicatorApi();
       
    58 
       
    59     void ConstructL();
       
    60 
       
    61     /**
       
    62      * Sets up a new test.
       
    63      */
       
    64     void SetupL();
       
    65 
       
    66     /**
       
    67      * Tears down a test.
       
    68      */
       
    69     void Teardown();
       
    70 
       
    71     /**
       
    72      * From MMusIndicatorObserver.
       
    73      * Instructs to start live video sharing.
       
    74      */
       
    75     virtual void StartLiveSharingL();
       
    76 
       
    77     /**
       
    78      * Actual unit test methods.
       
    79      */
       
    80     void UT_CMusIndicatorApi_NewLL();
       
    81     void UT_CMusIndicatorApi_IndicateAvailabilityLL();
       
    82     void UT_CMusIndicatorApi_RunLL();
       
    83     void UT_CMusIndicatorApi_DoCancelL();
       
    84     void UT_CMusIndicatorApi_RunErrorL();
       
    85     void UT_CMusIndicatorApi_PlaySoundCompleteL();
       
    86     void UT_CMusIndicatorApi_PlayToneLL();
       
    87     
       
    88     
       
    89 private: // data
       
    90 
       
    91     /**
       
    92      * Tested class.
       
    93      * Own.
       
    94      */
       
    95     CMusIndicatorApi* iIndicatorApi;
       
    96 
       
    97     /**
       
    98      * Tells if observer method MMusIndicatorObserver::StartLiveSharingL has
       
    99      * been called.
       
   100      */    
       
   101     TBool iStartLiveSharingLCalled;
       
   102 
       
   103     EUNIT_DECLARE_TEST_TABLE;
       
   104 
       
   105     };
       
   106 
       
   107 #endif // UT_CMUSINDICATORAPI_H