|
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 __UNITTEST_MEDIAMODEL_H__ |
|
18 #define __UNITTEST_MEDIAMODEL_H__ |
|
19 |
|
20 #include <QtTest/QtTest> |
|
21 |
|
22 class GlxMediaModel; |
|
23 |
|
24 class TestGlxMediaModel : public QObject |
|
25 { |
|
26 Q_OBJECT |
|
27 |
|
28 signals: |
|
29 |
|
30 private slots: |
|
31 /** |
|
32 * called before anything else when test starts |
|
33 */ |
|
34 void initTestCase(); |
|
35 |
|
36 /** |
|
37 * will be called before each testfunction is executed. |
|
38 * |
|
39 */ |
|
40 void init(); |
|
41 |
|
42 void rowCountTestCase(); |
|
43 void columnCountTestCase(); |
|
44 void parentTestCase(); |
|
45 |
|
46 void itemImageDataInvalidIndexTestCase(); |
|
47 void itemImageDataGridImagetestCase(); |
|
48 void itemImageDataHdmiBitmapTestCase(); |
|
49 |
|
50 void ItemPropertyViewTitleTestCase(); |
|
51 void ItemPropertyImageTitleTestCase(); |
|
52 void ItemPropertyDateTestCase(); |
|
53 void ItemPropertyCorruptImageTestCase(); |
|
54 void ItemPropertyTimeTestCase(); |
|
55 void ItemPropertySizeTestCase(); |
|
56 void ItemPropertyDescTestCase(); |
|
57 |
|
58 void indexTestCase(); |
|
59 void setDataContextRoleTestCase(); |
|
60 void setDataRemoveContextRoleTestCase(); |
|
61 void setDataFocusIndexRoleTestCase(); |
|
62 void setDataVisualIndexTestCase(); |
|
63 void setDataSelectedIndexTestCase(); |
|
64 void setDataSubStateTestCase(); |
|
65 void setDataTempVisualIndexTestCase(); |
|
66 void GetGridIconItemTestCase(); |
|
67 void GetFsIconItemTestCase(); |
|
68 void getFullScreenIconTestCase(); |
|
69 void getFullScreenImagetestCase(); |
|
70 void setContextModeTestCase(); |
|
71 void removeContextModeTestCase(); |
|
72 void setFocusIndexTestCase(); |
|
73 void getFocusIndexTestcase(); |
|
74 void setSelectedIndexTestCase(); |
|
75 void getCorruptDefaultIconTestCase(); |
|
76 void thumbnailPopulatedCheckTestCase(); |
|
77 void itemUpdatedTestCase(); |
|
78 void itemsAddedTestCase(); |
|
79 void itemsRemovedTestCase(); |
|
80 void itemCorruptedTestCase(); |
|
81 |
|
82 void albumTitleUpdatedTestCase(); |
|
83 void modelpopulatedTestCase(); |
|
84 void updateDetailItemsTestCase(); |
|
85 void updateItemIconTestCase(); |
|
86 |
|
87 /** |
|
88 * will be called after every testfunction. |
|
89 * |
|
90 */ |
|
91 void cleanup(); |
|
92 |
|
93 /** |
|
94 * will be called after testing ends |
|
95 * |
|
96 */ |
|
97 void cleanupTestCase(); |
|
98 |
|
99 private: |
|
100 |
|
101 /** |
|
102 * object under test |
|
103 */ |
|
104 GlxMediaModel *mModel; |
|
105 }; |
|
106 |
|
107 #endif //__UNITTEST_MEDIAMODEL_H__ |