mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatorapi.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:31:01 +0100
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201032 Kit: 201035

/*
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Unit tests for CMusIndicatorApi class.
*
*/



#ifndef UT_CMUSINDICATORAPI_H
#define UT_CMUSINDICATORAPI_H


#include "musindicatorobserver.h"
#include <digia/eunit/ceunittestsuiteclass.h>
#include <e32def.h>


#ifndef NONSHARABLE_CLASS
    #define NONSHARABLE_CLASS(x) class x
#endif


class CMusIndicatorApi;


/**
 *  Unit test class for CMusIndicatorApi class.
 *  Implements unit tests for CMusIndicatorApi class.
 */
NONSHARABLE_CLASS( UT_CMusIndicatorApi ) : public
    CEUnitTestSuiteClass,
    MMusIndicatorObserver
    {
public:

    static UT_CMusIndicatorApi* NewL();
    static UT_CMusIndicatorApi* NewLC();

    /**
     * Destructor.
     */
    ~UT_CMusIndicatorApi();

private:

    UT_CMusIndicatorApi();

    void ConstructL();

    /**
     * Sets up a new test.
     */
    void SetupL();

    /**
     * Tears down a test.
     */
    void Teardown();

    /**
     * From MMusIndicatorObserver.
     * Instructs to start live video sharing.
     */
    virtual void StartLiveSharingL();

    /**
     * Actual unit test methods.
     */
    void UT_CMusIndicatorApi_NewLL();
    void UT_CMusIndicatorApi_IndicateAvailabilityLL();
    void UT_CMusIndicatorApi_RunLL();
    void UT_CMusIndicatorApi_DoCancelL();
    void UT_CMusIndicatorApi_RunErrorL();
    void UT_CMusIndicatorApi_PlaySoundCompleteL();
    void UT_CMusIndicatorApi_PlayToneLL();
    
    
private: // data

    /**
     * Tested class.
     * Own.
     */
    CMusIndicatorApi* iIndicatorApi;

    /**
     * Tells if observer method MMusIndicatorObserver::StartLiveSharingL has
     * been called.
     */    
    TBool iStartLiveSharingLCalled;

    EUNIT_DECLARE_TEST_TABLE;

    };

#endif // UT_CMUSINDICATORAPI_H