30
|
1 |
|
|
2 |
/**
|
|
3 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
* All rights reserved.
|
|
5 |
* This component and the accompanying materials are made available
|
|
6 |
* under the terms of "Eclipse Public License v1.0"
|
|
7 |
* which accompanies this distribution, and is available
|
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
9 |
*
|
|
10 |
* Initial Contributors:
|
|
11 |
* Nokia Corporation - initial contribution.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description: tester for methods in CVideoCollectionClient
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef __TESTVIDEOCOLLECTIONCLIENT_H__
|
|
20 |
#define __TESTVIDEOCOLLECTIONCLIENT_H__
|
|
21 |
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <QtTest/QtTest>
|
|
25 |
|
|
26 |
#include "stub/inc/mpxmedia.h"
|
|
27 |
#include "stub/inc/mpxmediaarray.h"
|
|
28 |
#include "stub/inc/mpxattribute.h"
|
|
29 |
#include "stub/inc/mpxcollectionpath.h"
|
|
30 |
#include "stub/inc/mpxcollectionutility.h"
|
|
31 |
|
|
32 |
#include <mpxcollectionframeworkdefs.h>
|
|
33 |
|
|
34 |
|
|
35 |
class VideoCollectionClient;
|
34
|
36 |
class StubSignalReceiver;
|
30
|
37 |
|
|
38 |
class TestVideoCollectionClient : public QObject
|
|
39 |
{
|
|
40 |
Q_OBJECT
|
|
41 |
|
|
42 |
// test functions for the test framework
|
|
43 |
private slots:
|
|
44 |
|
|
45 |
|
|
46 |
/**
|
|
47 |
* will be called before each testfunction is executed.
|
|
48 |
*
|
|
49 |
*/
|
|
50 |
void init();
|
|
51 |
|
|
52 |
/**
|
|
53 |
* will be called after every testfunction.
|
|
54 |
*
|
|
55 |
*/
|
|
56 |
void cleanup();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* initialization while collectionutility exists allready
|
|
60 |
*
|
|
61 |
*/
|
|
62 |
void testInitializeCollUtilityExists();
|
|
63 |
|
|
64 |
/**
|
|
65 |
* initialization collection listener exists
|
|
66 |
*
|
|
67 |
*/
|
|
68 |
void testInitializeCollListenerExist();
|
|
69 |
|
|
70 |
/**
|
|
71 |
* initialization and collection utility creation fails
|
|
72 |
*
|
|
73 |
*/
|
|
74 |
void testInitializeUtilCreateFail();
|
|
75 |
|
|
76 |
/**
|
34
|
77 |
* initialization and collection utility creation fails
|
|
78 |
*
|
|
79 |
*/
|
|
80 |
void testInitializeNullReceiverCreateFail();
|
|
81 |
|
|
82 |
/**
|
30
|
83 |
* succeeded initialization test
|
|
84 |
*
|
|
85 |
*/
|
|
86 |
void testInitializeSucceed();
|
|
87 |
|
|
88 |
/**
|
|
89 |
* verifies collectionLevel -call
|
|
90 |
*
|
|
91 |
*/
|
|
92 |
void testCollectionLevel();
|
|
93 |
|
|
94 |
/**
|
|
95 |
* verifies getOpenStatus -call
|
|
96 |
*
|
|
97 |
*/
|
|
98 |
void testGetOpenStatus();
|
|
99 |
|
|
100 |
/**
|
|
101 |
* verifies setOpenStatus -call
|
|
102 |
*
|
|
103 |
*/
|
|
104 |
void testSetOpenStatus();
|
|
105 |
|
|
106 |
/**
|
|
107 |
* verifies startOpenCollection -call
|
|
108 |
*
|
|
109 |
*/
|
|
110 |
void testStartOpenCollection();
|
|
111 |
|
|
112 |
/**
|
|
113 |
* verifies startOpenCurrentState -call
|
|
114 |
*
|
|
115 |
*/
|
|
116 |
void testStartOpenCurrentState();
|
|
117 |
|
|
118 |
|
|
119 |
/**
|
|
120 |
* verifies deleteVideos -call
|
|
121 |
*
|
|
122 |
*/
|
|
123 |
void testDeleteVideos();
|
|
124 |
|
|
125 |
|
|
126 |
/**
|
|
127 |
* verifies openVideo -call
|
|
128 |
*
|
|
129 |
*/
|
|
130 |
void testOpenCategory();
|
|
131 |
|
|
132 |
/**
|
|
133 |
* verifies openVideo -call
|
|
134 |
*
|
|
135 |
*/
|
|
136 |
void testOpenVideo();
|
|
137 |
|
|
138 |
/**
|
|
139 |
* verifies fetchMpxMediaByMpxId -call
|
|
140 |
*
|
|
141 |
*/
|
|
142 |
void testFetchMpxMediaByMpxId();
|
|
143 |
|
|
144 |
/**
|
|
145 |
* verifies getVideoDetails -call
|
|
146 |
*
|
|
147 |
*/
|
|
148 |
void testGetVideoDetails();
|
|
149 |
|
|
150 |
/**
|
35
|
151 |
* verifies removeAlbums
|
|
152 |
*/
|
|
153 |
void testRemoveAlbums();
|
|
154 |
|
|
155 |
/**
|
30
|
156 |
* verifies addNewCollection -call.
|
|
157 |
*/
|
|
158 |
void testAddNewCollection();
|
|
159 |
|
|
160 |
/**
|
34
|
161 |
* verifies addItemsInAlbum
|
|
162 |
*/
|
|
163 |
void testAddItemsInAlbum();
|
|
164 |
|
|
165 |
/**
|
35
|
166 |
* verifies removeItemsFromAlbum
|
|
167 |
*/
|
|
168 |
void testRemoveItemsFromAlbum();
|
|
169 |
|
|
170 |
/**
|
50
|
171 |
* verifies testRenameItem
|
36
|
172 |
*/
|
50
|
173 |
void testRenameItem();
|
36
|
174 |
|
|
175 |
/**
|
30
|
176 |
* verifies back -call
|
|
177 |
*
|
|
178 |
*/
|
|
179 |
void testBack();
|
|
180 |
|
|
181 |
|
|
182 |
private:
|
|
183 |
|
|
184 |
/**
|
|
185 |
* testobject
|
|
186 |
*/
|
|
187 |
VideoCollectionClient* mTestObject;
|
34
|
188 |
|
|
189 |
/**
|
|
190 |
* stubbed signal receiver
|
|
191 |
*/
|
|
192 |
StubSignalReceiver* mSignalReceiver;
|
30
|
193 |
|
|
194 |
};
|
|
195 |
|
|
196 |
|
|
197 |
|
|
198 |
|
|
199 |
#endif // __TESTVIDEOCOLLECTIONWRAPPER_H__
|
|
200 |
|
|
201 |
// End of file
|
|
202 |
|
|
203 |
|
|
204 |
|