messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/inc/testmmsplugin.h
changeset 70 a15d9966050f
parent 61 8ba0afbb4637
child 72 6f657153cbc5
equal deleted inserted replaced
61:8ba0afbb4637 70:a15d9966050f
     1 /*
       
     2  * Copyright (c) 2009 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: - Main test class for Msgnotification -indicator plugin, 
       
    15  *                                                   -notification dialog plugin
       
    16  */
       
    17 
       
    18 #ifndef TEST_MMS_PLUGIN_H
       
    19 #define TEST_MMS_PLUGIN_H
       
    20 
       
    21 #ifdef BUILD_TEST_DLL
       
    22 #define TEST_EXPORT Q_DECL_EXPORT
       
    23 #else
       
    24 #define TEST_EXPORT Q_DECL_IMPORT
       
    25 #endif
       
    26 
       
    27 #include <QObject>
       
    28 #include <e32const.h>
       
    29 
       
    30 class UniEditorMmsPlugin;
       
    31 class ConvergedMessage;
       
    32 class MmsTestBed;
       
    33 class QSignalSpy;
       
    34 
       
    35 class TEST_EXPORT TestMmsPlugin: public QObject
       
    36     {
       
    37     Q_OBJECT
       
    38 
       
    39 private slots:
       
    40      
       
    41     /**
       
    42         * Called by framework,its called before the 1st test function is executed.
       
    43      */  
       
    44    
       
    45     void initTestCase();
       
    46 
       
    47     /**
       
    48         * Called by framework,its called before each test function is executed.
       
    49      */  
       
    50 
       
    51     void init();
       
    52 
       
    53     /**
       
    54         * Test Sending MMS
       
    55      */  
       
    56 
       
    57     void testSendMMS(); 
       
    58 
       
    59     /**
       
    60         * Test receiving MMS
       
    61      */  
       
    62 
       
    63     void testMmsReceived();
       
    64 
       
    65     /**
       
    66         * Called by framework,its called after each test function is executed.
       
    67      */  
       
    68 
       
    69     void cleanup();
       
    70 
       
    71     /**
       
    72         * Called by framework,its called after the last test function is executed.
       
    73      */  
       
    74 
       
    75     void cleanupTestCase();
       
    76 
       
    77 private:
       
    78 
       
    79     QSignalSpy *spy_draft;
       
    80     QSignalSpy *spy_outbox;
       
    81     QSignalSpy *spy_sent;
       
    82 
       
    83     UniEditorMmsPlugin* msgPlugin;
       
    84     int mmsId;
       
    85     MmsTestBed* mmstestbed;
       
    86    
       
    87     };
       
    88 #endif //TEST_MMS_PLUGIN_H