|
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_CXEENGINESYMBIAN_H |
|
18 #define UNITTEST_CXEENGINESYMBIAN_H |
|
19 |
|
20 #include <QObject> |
|
21 |
|
22 #include "cxenamespace.h" |
|
23 |
|
24 class CxeEngineSymbianUnit; |
|
25 class CxeFakeCameraDeviceControl; |
|
26 class CxeFakeStillCaptureControl; |
|
27 class CxeFakeVideoCaptureControl; |
|
28 class CxeFakeViewfinderControl; |
|
29 |
|
30 class UnitTestCxeEngineSymbian : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 UnitTestCxeEngineSymbian(); |
|
36 ~UnitTestCxeEngineSymbian(); |
|
37 |
|
38 private slots: |
|
39 void init(); |
|
40 void cleanup(); |
|
41 |
|
42 void testCameraDeviceControl(); |
|
43 void testViewfinderControl(); |
|
44 void testStillCaptureControl(); |
|
45 void testVideoCaptureControl(); |
|
46 void testAutoFocusControl(); |
|
47 void testZoomControl(); |
|
48 void testSettings(); |
|
49 void testSensorEventHandler(); |
|
50 void testFeatureManager(); |
|
51 void testMode(); |
|
52 void testInitMode1(); |
|
53 void testInitMode2(); |
|
54 void testInitMode3(); |
|
55 void testInitMode4(); |
|
56 |
|
57 private: |
|
58 // Helper methods for test cases |
|
59 |
|
60 private: |
|
61 // We actually use the a derived class (CxeEngineSymbianUnit) for testing, |
|
62 // because we need to be able to replace the engine controls with fake |
|
63 // implementations. |
|
64 CxeEngineSymbianUnit *mEngine; //!< This will be recreated for each test |
|
65 |
|
66 CxeFakeCameraDeviceControl *mCameraDeviceControl; //!< Owned by mEngine |
|
67 CxeFakeStillCaptureControl *mStillCaptureControl; //!< Owned by mEngine |
|
68 CxeFakeVideoCaptureControl *mVideoCaptureControl; //!< Owned by mEngine |
|
69 CxeFakeViewfinderControl *mViewfinderControl; //!< Owned by mEngine |
|
70 }; |
|
71 |
|
72 #endif // UNITTEST_CXEENGINESYMBIAN_H |