telutils/keysequencerecognitionservice/tsrc/ut_keysequencehandler/ut_keysequencehandler.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_KEYSEQUENCEHANDLER_H
       
    19 #define UT_KEYSEQUENCEHANDLER_H
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 #include <mockservice.h>
       
    23 #include "keysequencehandler.h"
       
    24 
       
    25 class TestClassDriver;
       
    26 
       
    27 class TestClassDriver : public KeySequenceHandler
       
    28 {
       
    29 public:
       
    30     bool executeKeySequence(const QString &keySequence);
       
    31     void setKeySequenceValidator(const QString &validator);  
       
    32 };
       
    33 
       
    34 class UT_KeySequenceHandler : public QObject, public MockService
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38 public:    
       
    39     
       
    40     UT_KeySequenceHandler();
       
    41     ~UT_KeySequenceHandler();
       
    42     
       
    43 private slots:
       
    44 
       
    45     void init();
       
    46     void cleanup();
       
    47     
       
    48     void t_keySequenceValidator();
       
    49     void t_setKeySequenceValidator();
       
    50     
       
    51 private:
       
    52     TestClassDriver *m_handler;
       
    53 };
       
    54 
       
    55 #endif  // UT_KEYSEQUENCEHANDLER_H