diff -r 1a6714c53019 -r cce62ebc198e radiohswidget/tsrc/inc/t_radiohswidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radiohswidget/tsrc/inc/t_radiohswidget.h Tue Aug 31 15:15:02 2010 +0300 @@ -0,0 +1,86 @@ +/* +* Copyright (c) 2010 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: +* +*/ + + +#ifndef T_RADIOHSWIDGET_H_ +#define T_RADIOHSWIDGET_H_ + + +// System includes +#include + +// User includes +#include "radiohswidget.h" +#include "radiohswidgetprofilereader.h" +#include "radiohswidgetradioserviceclient.h" + +/*! + \struct SendInfo + \brief Helper to store send information on unit tests. +*/ +struct SendInfo { + /*! Stores the type of information send. */ + int informationType; + /*! Stores the information to send. */ + QVariant information; + /*! Stores the actual data of information send. */ + QVariant data; +}; + + +class TestRadioHsWidget : public QObject +{ + Q_OBJECT + +public: + + TestRadioHsWidget(); + ~TestRadioHsWidget(); + +public slots: + +private slots: + // test framework called slots + void initTestCase(); + void init(); + void cleanup(); + void cleanupTestCase(); + void offlineModeTest(); + void validReplies(); + void invalidReplies(); + +private: + void createSendInfo(int informationType, const QVariant information); + void verifyReceivedInformation(int informationType, + const QVariant &receivedInformation, const QVariant &sendInformation); + +private: // Data + /*! Stores RadioHsWidget stub. */ + QScopedPointer mRadioHsWidgetStub; + /*! Stores RadioHsWidgetProfileReader. */ + QScopedPointer mProfileReader; + /*! Stores RadioHsWidgetRadioServiceClient. */ + QScopedPointer mServiceClient; + + /*! Stores refresh request mock. */ + //XQAiwRequest *application_manager_mock_refresh_request; + + /*! Stores send information. */ + QList mSendInfos; +}; + +#endif /* T_RADIOHSWIDGET_H_ */