cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef UT_PSETCALLDIVERTINGWRAPPER_H
       
    19 #define UT_PSETCALLDIVERTINGWRAPPER_H
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 #include <mockservice.h>
       
    23 
       
    24 class PSetNetworkWrapper;
       
    25 class CPsetContainer;
       
    26 class CPsetNetwork;
       
    27 class CPSetRefreshHandlerMock;
       
    28 
       
    29 class UT_PSetNetworkWrapper : public QObject, public MockService
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:    
       
    34     UT_PSetNetworkWrapper();
       
    35     ~UT_PSetNetworkWrapper();
       
    36     
       
    37 private slots:
       
    38 
       
    39     void init();
       
    40     void cleanup();
       
    41     
       
    42     void t_construction();
       
    43     void t_getAvailableNetworks();
       
    44     void t_getNetworkSelectionMode();
       
    45     void t_selectNetwork();
       
    46     void t_cancelRequest();
       
    47     
       
    48     void t_getNetworkAccessMode();
       
    49     void t_setNetworkAccessMode();
       
    50 
       
    51     // private implementation tests
       
    52     // tests for MPsetNetworkInfoObserver functionality
       
    53     void t_handleNetworkInfoReceived();
       
    54     void t_handleCurrentNetworkInfo();
       
    55     void t_handleNetworkChangedWithNetworkStatus();
       
    56     void t_handleNetworkChangedWithPhoneRegistrationStatus();
       
    57     void t_handleSearchingNetworks();
       
    58     void t_handleRequestingSelectedNetwork();
       
    59     void t_handleCallActivated();
       
    60     void t_handleNetworkErrorFromInfoObserver();
       
    61     
       
    62     // tests for MPsetNetworkModeObserver functionality
       
    63     void t_handleNetworkSystemModeEvents();
       
    64     void t_handleNetworkErrorFromModeObserver();
       
    65     
       
    66     void t_exceptionSafety();
       
    67     
       
    68     void t_isManualNetworkSelectionSupported();
       
    69     void t_AllowRefresh();
       
    70     void t_Refresh();
       
    71     
       
    72 private:
       
    73     PSetNetworkWrapper *m_wrapper;
       
    74     CPsetContainer *m_psetContainerMock;
       
    75     CPsetNetwork *m_psetNetworkMock;
       
    76     CPsetNetwork *m_psetNetworkModeMock;
       
    77     CPSetRefreshHandlerMock *m_refreshHandler;
       
    78 };
       
    79 
       
    80 #endif