mmsharing/mmshindicator/tsrc/ut_indicator/inc/ut_cmusindicatorapi.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 15:12:07 +0300
branchRCL_3
changeset 22 73a1feb507fb
parent 0 f0cf47e981f9
child 23 bc78a40cd63c
permissions -rw-r--r--
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_ConfirmationQueryLL();
    void UT_CMusIndicatorApi_IndicateAvailabilityLL();
    void UT_CMusIndicatorApi_RunLL();
    void UT_CMusIndicatorApi_DoCancelL();
    void UT_CMusIndicatorApi_RunErrorL();
    void UT_CMusIndicatorApi_PlaySoundCompleteL();
    void UT_CMusIndicatorApi_PlayToneLL();
    void UT_CMusIndicatorApi_NoteTextLCL();
    void UT_CMusIndicatorApi_ShowLiveSharingQueryLL();
    void UT_CMusIndicatorApi_LiveSharingQueryTimeoutL();
    
    
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