|
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: Videoplayerengine test class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 // TODO: at the moment we are not able to get access to all private methods |
|
19 // to the class under test. We need to declare some own framework in order |
|
20 // to declare testclasses into friends of classes under test etc. |
|
21 // |
|
22 // missing test functions: |
|
23 // - how to setup construction to fail for testing purposes |
|
24 |
|
25 |
|
26 // Version : %version: da1mmcf#9 % |
|
27 |
|
28 #ifndef __TESTVIDEOPLAYERENGINE_H__ |
|
29 #define __TESTVIDEOPLAYERENGINE_H__ |
|
30 |
|
31 |
|
32 // INCLUDES |
|
33 #include <QtTest/QtTest> |
|
34 #include <qpointer.h> |
|
35 |
|
36 class MpxViewPlugin; |
|
37 class VideoPlaybackWrapper; |
|
38 class VideoPlayerEngine; |
|
39 class VideoServices; |
|
40 |
|
41 class TestVideoPlayerEngine : public QObject |
|
42 { |
|
43 |
|
44 Q_OBJECT |
|
45 |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Contructor. |
|
50 * |
|
51 */ |
|
52 TestVideoPlayerEngine(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 * |
|
57 */ |
|
58 virtual ~TestVideoPlayerEngine(); |
|
59 |
|
60 private slots: |
|
61 |
|
62 void init(bool isService = false); |
|
63 void cleanup(); |
|
64 |
|
65 void testCreateDelete(); |
|
66 void testCreateDeleteService(); |
|
67 |
|
68 void testInitialize(); |
|
69 void testInitializeService(); |
|
70 |
|
71 void testMultipleInitialize(); |
|
72 void testMultipleInitializeService(); |
|
73 |
|
74 void testHandleCommandPreInit(); |
|
75 void testHandleCommandPostInit(); |
|
76 void testHandleCommandPreAndPostInit(); |
|
77 |
|
78 void testHandleCommandPluginFail(); |
|
79 void testHandleCommandPluginFail1(); |
|
80 void testHandleCommandPluginFail2(); |
|
81 |
|
82 void testPlayMedia(); |
|
83 void testSetEmbedded(); |
|
84 |
|
85 void testInitWithActivityData(); |
|
86 void testHandleQuitWihtActivityData(); |
|
87 |
|
88 // called after last test case executed |
|
89 void cleanupTestCase(); |
|
90 |
|
91 signals: |
|
92 |
|
93 void aboutToQuit(); |
|
94 void command( int ); |
|
95 |
|
96 private: |
|
97 |
|
98 QPointer<VideoPlayerEngine> mTestObject; |
|
99 |
|
100 MpxViewPlugin* mCurrentViewPlugin; |
|
101 MpxViewPlugin* mPlaybackViewPlugin; |
|
102 MpxViewPlugin* mCollectionViewPlugin; |
|
103 MpxViewPlugin* mFileDetailsViewPlugin; |
|
104 |
|
105 VideoServices* mVideoServices; |
|
106 |
|
107 VideoPlaybackWrapper *mPlaybackWrapper; |
|
108 |
|
109 }; |
|
110 |
|
111 #endif // __TESTVIDEOPLAYERENGINE_H__ |
|
112 |
|
113 // End of file |
|
114 |
|
115 |
|
116 |