|
1 /** |
|
2 * Copyright (c) 2010 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: tester for methods in TestFileDetailsWidget |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 #ifndef __TESTFILEDETAILSWIDGET_H__ |
|
21 #define __TESTFILEDETAILSWIDGET_H__ |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <QtTest/QtTest> |
|
26 |
|
27 class VideoPlaybackFileDetailsWidget; |
|
28 class VideoPlaybackControlsController; |
|
29 class QDateTime; |
|
30 |
|
31 class TestFileDetailsWidget : public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * will be called before each testfunction is executed. |
|
39 * |
|
40 */ |
|
41 void init(); |
|
42 |
|
43 /** |
|
44 * will be called after every testfunction. |
|
45 * |
|
46 */ |
|
47 void cleanup(); |
|
48 |
|
49 // test functions for the test framework |
|
50 private slots: |
|
51 |
|
52 // the order in which these testXX methods are declared is important |
|
53 // changing this order will affect the test results |
|
54 void testTitle(); |
|
55 void testDescription(); |
|
56 void testDuration(); |
|
57 void testDate(); |
|
58 void testLocation(); |
|
59 void testAuthor(); |
|
60 void testCopyright(); |
|
61 void testLanguage(); |
|
62 void testKeywords(); |
|
63 void testSize(); |
|
64 void testResolution(); |
|
65 void testFormat(); |
|
66 void testBitrate(); |
|
67 void testFolder(); |
|
68 |
|
69 private: |
|
70 void verifyResult( QString primaryText, |
|
71 bool exist, |
|
72 QString expectedSecondaryText = "", |
|
73 bool needToBeCompared = true ); |
|
74 |
|
75 QString dateTimeStringFormat( QDateTime dateTime ); |
|
76 |
|
77 signals: |
|
78 void commandSignal(int); |
|
79 |
|
80 private: |
|
81 VideoPlaybackFileDetailsWidget* mWidget; |
|
82 VideoPlaybackControlsController* mController; |
|
83 }; |
|
84 |
|
85 |
|
86 #endif // __TESTVIDEOPLAYBACKFILEDETAILSWIDGET_H__ |
|
87 |
|
88 // End of file |