|
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 * Version : %version: 3 % |
|
17 */ |
|
18 #ifndef TestCacheProxy_H |
|
19 #define TestCacheProxy_H |
|
20 |
|
21 #include <QObject> |
|
22 |
|
23 class QAbstractItemModel; |
|
24 |
|
25 class BMHelper; |
|
26 class HgBufferManager; |
|
27 class DataProviderHelper; |
|
28 class HgCacheProxyModel; |
|
29 class CacheProxyHelper; |
|
30 |
|
31 class TestCacheProxy: public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 public: |
|
36 TestCacheProxy(): QObject() {}; |
|
37 |
|
38 private: |
|
39 void testQAbstractItemModel(QAbstractItemModel* model, int rows, int columns); |
|
40 |
|
41 private slots: |
|
42 void initTestCase();//before first |
|
43 void init();//before each |
|
44 void cleanup();//after each |
|
45 void cleanupTestCase(); //after last |
|
46 |
|
47 //HgBufferManager |
|
48 void testBM_SetPosition(); |
|
49 void testBM_ResetBuffer(); |
|
50 void testBM_ItemCountChanged(); |
|
51 void testBM_ResizeCache(); |
|
52 |
|
53 //HgDataProviderModel |
|
54 void testDP_QAbstractItemModel(); |
|
55 void testDP_RequestReleaseAndData(); |
|
56 void testDP_CacheManagment(); |
|
57 void testDP_QPixmapPool(); |
|
58 |
|
59 //HgCacheProxyModel |
|
60 void testCP_QAbstractItemModel(); |
|
61 void testCP_SignalsForward(); |
|
62 void testCP_ResizeCache(); |
|
63 void testCP_Data(); |
|
64 void testCP_Sort(); |
|
65 // void testCP_Filter(); |
|
66 |
|
67 private: |
|
68 BMHelper* bmh; |
|
69 HgBufferManager* bm; |
|
70 DataProviderHelper* dph; |
|
71 HgCacheProxyModel* cp; |
|
72 CacheProxyHelper* cph; |
|
73 |
|
74 }; |
|
75 #endif // TestCacheProxy_H |