satui/satapp/tsrc/ut_satapp/inc/ut_satapptoneprovider.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_SATAPPTONEPROVIDER_H
       
    19 #define UT_SATAPPTONEPROVIDER_H
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 #include <QObject>
       
    23 #include <msatuiobserver.h>
       
    24 
       
    25 
       
    26 // Class forwards
       
    27 class SatAppToneProvider;
       
    28 
       
    29 // class declaration
       
    30 class Ut_SatAppToneProvider : public QObject
       
    31 {
       
    32     Q_OBJECT
       
    33 
       
    34 public:
       
    35 
       
    36     Ut_SatAppToneProvider(QObject *parent = 0);
       
    37 
       
    38 private slots:
       
    39 
       
    40     void testCreateProvider_data();
       
    41     void testCreateProvider();
       
    42     void testClearScreen();
       
    43     
       
    44     void testPlayTone_data();
       
    45     void testPlayTone();
       
    46     void testplayDoubleTone_data();
       
    47     void testplayDoubleTone();
       
    48     void testPlayToneAndClearScreen();
       
    49 
       
    50     void testMatoPrepareComplete_data();
       
    51     void testMatoPrepareComplete();
       
    52 //    void testMatoPlayComplete_data();
       
    53 //    void testMatoPlayComplete();
       
    54 //    void testMapcPlayComplete_data();
       
    55 //    void testMapcPlayComplete();
       
    56     void testMapcInitComplete_data();
       
    57     void testMapcInitComplete();
       
    58     void testRecognizeTone_data();
       
    59     void testRecognizeTone();
       
    60     void testPrepareAudioToneUtility();
       
    61 
       
    62 };
       
    63 
       
    64 // internal helper class
       
    65 class ToneProviderTest: public QObject
       
    66 {
       
    67     Q_OBJECT
       
    68 
       
    69 public:
       
    70 
       
    71     ToneProviderTest();
       
    72     ~ToneProviderTest();
       
    73     static SatAppToneProvider* getToneInstance();
       
    74     bool isMessageBoxShown();
       
    75     bool isTimerActive();
       
    76     void ConstructAudioTone();
       
    77     void DestroyAudioTone();
       
    78     void ConstructAudioPlayer();
       
    79     void DestroyAudioPlayer();
       
    80     void ConstructTimer(bool active);
       
    81     void DestroyTimer();
       
    82     void SetPlayToneResult(TSatUiResponse error);
       
    83     void TestRecognizeTone(int tone, int duration);
       
    84 
       
    85 public slots:
       
    86 
       
    87     void cleanup();
       
    88 
       
    89 public:
       
    90     
       
    91     // test data
       
    92     SatAppToneProvider *mTone;
       
    93 
       
    94 };
       
    95 
       
    96 #endif // UT_SATAPPTONEPROVIDER_H