satui/satapp/tsrc/ut_satapp/inc/ut_satappmenuprovider.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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 *
       
    16 */
       
    17 
       
    18 #ifndef UT_SATAPPMENUPROVIDER_H
       
    19 #define UT_SATAPPMENUPROVIDER_H
       
    20 
       
    21 // includes
       
    22 #include <QtTest/QtTest>
       
    23 #include <QObject>
       
    24 
       
    25 
       
    26 // forward declarations
       
    27 class HbMainWindow;
       
    28 class SatAppMenuProvider;
       
    29 
       
    30 
       
    31 
       
    32 // QTest class
       
    33 class Ut_SatAppMenuProvider : public QObject
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37 public:
       
    38 
       
    39     Ut_SatAppMenuProvider(
       
    40             HbMainWindow* mainWindow, QObject *parent = 0);
       
    41 
       
    42 private slots:
       
    43 
       
    44     void testResetState();
       
    45 
       
    46     void testSetUpMenu_data();
       
    47     void testSetUpMenu();
       
    48     void testSetUpMenuAndReset();
       
    49     void testSetUpMenuAndDelete();
       
    50 
       
    51     void testSelectItem_data();
       
    52     void testSelectItem();
       
    53     void testSelectItemAndBack();
       
    54     void testSelectItemAndTimeout();
       
    55     void testSelectItemAndReset();
       
    56     void testSelectItemAndDelete();
       
    57 
       
    58 private:
       
    59 
       
    60     HbMainWindow* mMainWindow; // not own
       
    61 
       
    62 };
       
    63 
       
    64 
       
    65 // internal helper class
       
    66 class MenuProviderTest: public QObject
       
    67 {
       
    68     Q_OBJECT
       
    69 
       
    70 public:
       
    71 
       
    72     MenuProviderTest(HbMainWindow* mainWindow);
       
    73     ~MenuProviderTest();
       
    74 
       
    75 public slots:
       
    76     void loadMainview();
       
    77     void simulateItemSelected();
       
    78     void simulateBackButtonClicked();
       
    79     void cleanup();
       
    80 
       
    81 public:
       
    82 
       
    83     // test data
       
    84     SatAppMenuProvider *mMenu;
       
    85     int mItemIndexToBeSelected;
       
    86 
       
    87 };
       
    88 
       
    89 
       
    90 #endif // UT_SATAPPMENUPROVIDER_H