cmmanager/cppacketdataapplugin/tsrc/ut/testcppacketdataapplugin.h
changeset 20 9c97ad6591ae
child 32 5c4486441ae6
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
       
     1 /*
       
     2 * Copyright (c) 2010 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 * Control Panel WLAN AP plugin unit testing.
       
    16 */
       
    17 
       
    18 #include <QStringList>
       
    19 #include <QtTest/QtTest>
       
    20 #include <cmmanagerdefines_shim.h>
       
    21 
       
    22 class HbDialog;
       
    23 class HbMainWindow;
       
    24 class HbAutoTestMainWindow;
       
    25 class HbDataFormModelItem;
       
    26 class HbAction;
       
    27 class CpPacketDataApView;
       
    28 class CpBearerApPluginInterface;
       
    29 
       
    30 class TestCpPacketDataApPlugin : public QObject
       
    31 {
       
    32     Q_OBJECT
       
    33 
       
    34     signals:
       
    35         // Test signals
       
    36         void menuActionTriggered(HbAction *);
       
    37     
       
    38     public slots:
       
    39         // Test framework functions
       
    40         void initTestCase();
       
    41         void cleanupTestCase();
       
    42         void init();
       
    43         void cleanup();
       
    44 
       
    45     private slots:
       
    46         // Test cases
       
    47         void tcChangeConnectionName();
       
    48         void tcChangeConnectionName_data();
       
    49         void tcConnectionNameEmpty();
       
    50         void tcChangeAccessPointName();
       
    51         void tcChangeAccessPointName_data();
       
    52         void tcAccessPointNameEmpty();
       
    53         void tcChangeUserName();
       
    54         void tcChangeUserName_data();
       
    55         void tcScrollToBottom();
       
    56         void tcChangePromptPassword();
       
    57         void tcChangePassword();
       
    58         void tcChangePassword_data();
       
    59         void tcChangeAuthenticationMode();
       
    60         void tcChangeHomepage();
       
    61         void tcChangeHomepage_data();
       
    62         void tcAdvancedSettings();
       
    63 
       
    64     private:
       
    65         // Sub test cases
       
    66         void subCreateSettingsView(uint connetionMethodId);
       
    67         void subVerifyString(
       
    68             CMManagerShim::ConnectionMethodAttribute attribute,
       
    69             HbDataFormModelItem *item,
       
    70             QString expected);
       
    71         void subClearLineEdit(uint length);
       
    72         bool subGetBool(CMManagerShim::ConnectionMethodAttribute attribute);
       
    73         void subVerifyBool(
       
    74             CMManagerShim::ConnectionMethodAttribute attribute,
       
    75             bool expected);
       
    76         void subClickWidget(const QString &name);
       
    77 
       
    78     private:
       
    79         // Code references
       
    80         CpPacketDataApView *mTestView;
       
    81         
       
    82         // Test data
       
    83         HbAutoTestMainWindow *mMainWindow;
       
    84         CpBearerApPluginInterface *mPlugin;
       
    85 };