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_UNI_DATA_MODEL_SMS_PLUGIN_H |
|
18 #define TEST_UNI_DATA_MODEL_SMS_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 <txtetext.h> |
|
28 #include <txtrich.h> |
|
29 #include <mtclreg.h> |
|
30 #include <mtclbase.h> |
|
31 #include <msvids.h> |
|
32 #include <smsclnt.h> |
|
33 #include <smuthdr.h> |
|
34 #include <QDateTime> |
|
35 |
|
36 class UniDataModelPluginInterface; |
|
37 class UniDataModelLoader; |
|
38 class TestObserver; |
|
39 |
|
40 class ConvergedMessage; |
|
41 |
|
42 class TEST_EXPORT TestUniDataModelSMSPlugin : public QObject |
|
43 { |
|
44 Q_OBJECT |
|
45 |
|
46 private slots: |
|
47 //called by frame work. |
|
48 // void initTestCase();//called before the first testfunction is executed. |
|
49 // void cleanupTestCase();//called after the last testfunction was executed. |
|
50 void init();//called before each testfunction is executed. |
|
51 void cleanup();//called after every testfunction. |
|
52 |
|
53 //test cases. |
|
54 void testPluginLoading(); |
|
55 void testGetPluginWithoutLoading(); |
|
56 void testInboxMessage(); |
|
57 void testOutboxMessage(); |
|
58 void testSentMessage(); |
|
59 void testDraftsMessage(); |
|
60 void testDraftsMessageNoRecipient(); |
|
61 void testPluginLoadingMultipleTimes(); |
|
62 void testUnusedAPIs(); |
|
63 |
|
64 private: |
|
65 void createInboxSMS(); |
|
66 void createOutboxSMS(); |
|
67 void createSentSMS(); |
|
68 void createDraftsSMS(); |
|
69 void createDraftsSMSNoRecipient(); |
|
70 |
|
71 |
|
72 private: |
|
73 UniDataModelPluginInterface* pluginInterface; |
|
74 TestObserver* iObserver; |
|
75 CMsvSession* iMSession; |
|
76 CClientMtmRegistry* iMtmReg; |
|
77 CSmsClientMtm* iSmsClientMtm; |
|
78 TMsvId messageId; |
|
79 UniDataModelLoader* pluginLoader; |
|
80 QDateTime retTimeStamp ; |
|
81 }; |
|
82 |
|
83 class TestObserver : public MMsvSessionObserver |
|
84 { |
|
85 public: |
|
86 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, |
|
87 TAny* aArg3); |
|
88 }; |
|
89 |
|
90 #endif //TEST_UNI_DATA_MODEL_SMS_PLUGIN_H |
|