messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/testmmsplugin.h
branchGCC_SURGE
changeset 47 5b14749788d7
parent 35 a32b19fb291e
parent 44 36f374c67aa8
equal deleted inserted replaced
35:a32b19fb291e 47:5b14749788d7
     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:
       
    15  */
       
    16 
       
    17 #ifndef TEST_MMS_PLUGIN_H
       
    18 #define TEST_MMS_PLUGIN_H
       
    19 
       
    20 #ifdef BUILD_TEST_DLL
       
    21 #define TEST_EXPORT Q_DECL_EXPORT
       
    22 #else
       
    23 #define TEST_EXPORT Q_DECL_IMPORT
       
    24 #endif
       
    25 
       
    26 #include <QObject>
       
    27 #include <e32const.h>
       
    28 
       
    29 class UniEditorMmsPlugin;
       
    30 class ConvergedMessage;
       
    31 
       
    32 class TEST_EXPORT TestMmsPlugin: public QObject
       
    33     {
       
    34     Q_OBJECT
       
    35 
       
    36 private slots:
       
    37     //called by frame work.
       
    38     void initTestCase();//called before the first testfunction is executed.
       
    39     void cleanupTestCase();//called after the last testfunction was executed.
       
    40     void init();//called before each testfunction is executed.
       
    41     void cleanup();//called after every testfunction.
       
    42 
       
    43     //test cases.
       
    44     void testSendMMS(); //test sending mms
       
    45     void testMmsReceived(); // test receiving mms    
       
    46 
       
    47 private:
       
    48     void testReceived(int type);
       
    49     void validateMsg(const ConvergedMessage& message, const QString& serviceId);
       
    50     void createMMSMessageWithAttachmentAndSend(TBool priority = EFalse);
       
    51     void createMMSMessageWithSmilTextAndImageAttachmentAndSend();
       
    52 private:
       
    53     UniEditorMmsPlugin* msgPlugin;
       
    54     int smsId;
       
    55     int mmsId;
       
    56     };
       
    57 #endif //TEST_MMS_PLUGIN_H