diff -r ff3b6d0fd310 -r ae8abd0db65c cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h Fri Mar 19 09:40:14 2010 +0200 @@ -0,0 +1,73 @@ +/* +* Copyright (c) 2009 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 UT_PSETCALLDIVERTINGWRAPPER_H +#define UT_PSETCALLDIVERTINGWRAPPER_H + +#include +#include + +class PSetNetworkWrapper; +class CPsetContainer; +class CPsetNetwork; + +class UT_PSetNetworkWrapper : public QObject, public MockService +{ + Q_OBJECT + +public: + UT_PSetNetworkWrapper(); + ~UT_PSetNetworkWrapper(); + +private slots: + + void init(); + void cleanup(); + + void t_getAvailableNetworks(); + void t_getNetworkSelectionMode(); + void t_selectNetwork(); + void t_cancelRequest(); + + void t_getNetworkAccessMode(); + void t_setNetworkAccessMode(); + + // private implementation tests + // tests for MPsetNetworkInfoObserver functionality + void t_handleNetworkInfoReceived(); + void t_handleCurrentNetworkInfo(); + void t_handleNetworkChangedWithNetworkStatus(); + void t_handleNetworkChangedWithPhoneRegistrationStatus(); + void t_handleSearchingNetworks(); + void t_handleRequestingSelectedNetwork(); + void t_handleCallActivated(); + void t_handleNetworkErrorFromInfoObserver(); + + // tests for MPsetNetworkModeObserver functionality + void t_handleNetworkSystemModeEvents(); + void t_handleNetworkErrorFromModeObserver(); + + void t_exceptionSafety(); + +private: + PSetNetworkWrapper *m_wrapper; + CPsetContainer *m_psetContainerMock; + CPsetNetwork *m_psetNetworkMock; + CPsetNetwork *m_psetNetworkModeMock; +}; + +#endif