|
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 |
|
18 |
|
19 #ifndef __UT_SAPIDATAOBSERVER_H__ |
|
20 #define __UT_SAPIDATAOBSERVER_H__ |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include <digia/eunit/ceunittestsuiteclass.h> |
|
24 #include <msvapi.h> |
|
25 #include <liwcommon.h> |
|
26 #include <liwservicehandler.h> |
|
27 |
|
28 // INTERNAL INCLUDES |
|
29 #include "interface.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CSapiData; |
|
33 class CSapiDataObserver; |
|
34 class CSapiDataPlugin; |
|
35 class CLiwServiceHandler; |
|
36 |
|
37 #include <e32def.h> |
|
38 |
|
39 _LIT8( KCPInterface, "IDataSource" ); |
|
40 _LIT8( KCPService, "Service.ContentPublishing" ); |
|
41 |
|
42 // CLASS DEFINITION |
|
43 /** |
|
44 * |
|
45 * Unit test for the sapidataobserver |
|
46 * |
|
47 */ |
|
48 NONSHARABLE_CLASS( UT_SapiDataObserver ) : |
|
49 public CEUnitTestSuiteClass |
|
50 { |
|
51 public: // Constructors and destructors |
|
52 |
|
53 /** |
|
54 * Two phase construction |
|
55 */ |
|
56 static UT_SapiDataObserver* NewL(); |
|
57 static UT_SapiDataObserver* NewLC(); |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 ~UT_SapiDataObserver(); |
|
62 |
|
63 private: // Constructors and destructors |
|
64 |
|
65 UT_SapiDataObserver(); |
|
66 void ConstructL(); |
|
67 |
|
68 private: // New methods |
|
69 |
|
70 void SetupL(); |
|
71 |
|
72 void Teardown(); |
|
73 |
|
74 MLiwInterface* GetMessagingInterfaceL(); |
|
75 |
|
76 void ConstructTestL(); |
|
77 void RegisterTestL(); |
|
78 void ReleaseTestL(); |
|
79 void HandleNotifyTestL(); |
|
80 |
|
81 private: // Data |
|
82 |
|
83 CSapiData* iData; |
|
84 MLiwInterface* iInterface; |
|
85 CSapiDataPlugin* iPlugin; |
|
86 CLiwServiceHandler* iServiceHandler; |
|
87 CSapiDataObserver* iObserver; |
|
88 |
|
89 EUNIT_DECLARE_TEST_TABLE; |
|
90 }; |
|
91 |
|
92 #endif // __UT_SAPIDATAOBSERVER_H__ |
|
93 |
|
94 // End of file |