messagingapp/msgutils/unieditorutils/unieditorplugins/unieditormmsplugin/tsrc/testmmsgplugin/inc/testmmsplugin.h
changeset 52 12db4185673b
parent 44 36f374c67aa8
child 61 8ba0afbb4637
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
     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 declaration for MMS Plugin
       
    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 <QSignalSpy>
       
    28 #include <e32const.h>
       
    29 
       
    30 //Forward Declarations
       
    31 class UniEditorMmsPlugin;
       
    32 class ConvergedMessage;
       
    33 class MmsTestBed;
       
    34 
       
    35 //Class Declaration: TestMmsPlugin
       
    36 class TEST_EXPORT TestMmsPlugin: public QObject
       
    37     {
       
    38     Q_OBJECT
       
    39 
       
    40 private slots:
       
    41     
       
    42     /**
       
    43 	 * Initialises the whole Test
       
    44 	 **/  
       
    45    	void initTestCase();//called before the first testfunction is executed.
       
    46     
       
    47     /**
       
    48 	 * Initialises each Test Case
       
    49 	 **/  
       
    50     void init();//called before each testfunction is executed.
       
    51     
       
    52    	 /**
       
    53 	 * Creates a MMS messsage with a text attachment
       
    54 	 **/  
       
    55 	void createMMSWithTextAttachment();
       
    56 	
       
    57 	/**
       
    58 	 * Tests the MMS message with a text attachment
       
    59 	 **/  
       
    60 	void testMMSWithTextAttachment();
       
    61 	
       
    62 	/**
       
    63 	 * Sends the MMS message with a text attachment
       
    64 	 **/  
       
    65 	void sendMMSWithTextAttachment();
       
    66 	
       
    67 	/**
       
    68 	 * Tests that the MMS message is sent successfully
       
    69 	 **/  
       
    70 	void testSentMMSWithTextAttachment();
       
    71 	
       
    72 	/**
       
    73 	 * Creates a MMS messsage with a text and an Image attachments
       
    74 	 **/  
       
    75 	void createMMSWithTextAndImageAttachment();
       
    76 	
       
    77 	/**
       
    78 	 * Tests the MMS message with a text and an Image attachments
       
    79 	 **/  
       
    80 	void testMMSWithTextAndImageAttachment();
       
    81 	
       
    82 	/**
       
    83 	 * Sends the MMS message with a text and an Image attachments
       
    84 	 **/  
       
    85 	void sendMMSWithTextAndImageAttachment();
       
    86 	
       
    87 	/**
       
    88 	 * Tests that the MMS message is sent successfully
       
    89 	 **/  
       
    90 	void testSentMMSWithTextAndImageAttachment();
       
    91 	
       
    92 	/**
       
    93 	 * Cleans up each Test Case
       
    94 	 **/  	
       
    95 	void cleanup();
       
    96 	
       
    97 	/**
       
    98 	 * Cleans up the whole Test Case
       
    99 	 **/  	
       
   100     void cleanupTestCase();
       
   101 
       
   102 private: // Data
       
   103     
       
   104     /**
       
   105 	 * msgPlugin - MMS Message Plug-in
       
   106 	 **/  	
       
   107     UniEditorMmsPlugin* msgPlugin;
       
   108     
       
   109     /**
       
   110 	 * mmstestbed - MMS Message Simulator
       
   111 	 **/  	
       
   112     MmsTestBed* mmstestbed;
       
   113     
       
   114     /**
       
   115 	 * spy_draft - Signal Spy for Draft Folder
       
   116 	 **/  	
       
   117 	QSignalSpy* spy_draft;
       
   118 	
       
   119 	/**
       
   120 	 * spy_outbox - Signal Spy for Outbox Folder
       
   121 	 **/  	
       
   122 	QSignalSpy* spy_outbox;
       
   123 	
       
   124 	/**
       
   125 	 * spy_sent - Signal Spy for Sent Folder
       
   126 	 **/  	
       
   127 	QSignalSpy* spy_sent;
       
   128 	
       
   129 	/**
       
   130 	 * spy_inbox - Signal Spy for Inbox Folder
       
   131 	 **/  	
       
   132 	QSignalSpy* spy_inbox;
       
   133 	
       
   134 	/**
       
   135 	 * mmsMsgId - The MMS message Id
       
   136 	 **/  	
       
   137 	long int mmsMsgId;
       
   138     };
       
   139 #endif //TEST_MMS_PLUGIN_H