satui/satapp/tsrc/ut_satapp/inc/ut_satappaction.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_SATAPPACTION_H
       
    19 #define UT_SATAPPACTION_H
       
    20 
       
    21 // includes
       
    22 #include <QtTest/QtTest>
       
    23 #include <QObject>
       
    24 
       
    25 
       
    26 // forward declarations
       
    27 class SatAppAction;
       
    28 
       
    29 
       
    30 
       
    31 // QTest class
       
    32 class Ut_SatAppAction : public QObject
       
    33 {
       
    34     Q_OBJECT
       
    35 
       
    36 public:
       
    37 
       
    38     Ut_SatAppAction(QObject *parent = 0);
       
    39 
       
    40 private slots:
       
    41 
       
    42     void testAction();
       
    43     void testParams();
       
    44     void testComplete();
       
    45     void testCompleteSignal();
       
    46     void testDoubleComplete();
       
    47     void testAsyncActionRobustness();
       
    48     void testWait();
       
    49 
       
    50 private:
       
    51 
       
    52 
       
    53 };
       
    54 
       
    55 
       
    56 
       
    57 // Helper object
       
    58 class ActionHelper : public QObject
       
    59 {
       
    60     Q_OBJECT
       
    61 
       
    62 public:
       
    63     ActionHelper() {mCounter=0;}
       
    64     int& count() {return mCounter;}
       
    65 
       
    66 public slots:
       
    67     void inc() {++mCounter;}
       
    68     void del(SatAppAction*);
       
    69 
       
    70 private:
       
    71     int mCounter;
       
    72 };
       
    73 
       
    74 
       
    75 #endif // UT_SATAPPACTION_H