|
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 |
|
18 #ifndef UT_PSETCALLDIVERTINGWRAPPER_H |
|
19 #define UT_PSETCALLDIVERTINGWRAPPER_H |
|
20 |
|
21 #include <QtTest/QtTest> |
|
22 #include <mockservice.h> |
|
23 |
|
24 class PSetCallDivertingWrapper; |
|
25 class CPsetContainer; |
|
26 class CPsetCallDiverting; |
|
27 |
|
28 class UT_PSetCallDivertingWrapper : public QObject, MockService |
|
29 { |
|
30 Q_OBJECT |
|
31 |
|
32 public: |
|
33 UT_PSetCallDivertingWrapper(); |
|
34 ~UT_PSetCallDivertingWrapper(); |
|
35 |
|
36 private slots: |
|
37 |
|
38 void init(); |
|
39 void cleanup(); |
|
40 void t_construction(); |
|
41 |
|
42 void t_setCallDivertingWithValidParameters(); |
|
43 void t_setCallDivertingWithInvalidNumber(); |
|
44 void t_setCallDivertingWithEmergencyNumber(); |
|
45 void t_setCallDivertingException(); |
|
46 |
|
47 void t_getCallDivertingStatus(); |
|
48 void t_getCallDivertingStatusException(); |
|
49 void t_cancelProcess(); |
|
50 |
|
51 void t_getDefaultNumbers(); |
|
52 void t_getDefaultNumbersException(); |
|
53 void t_setNewDefaultNumber(); |
|
54 void t_getVoiceMailBoxNumber(); |
|
55 void t_queryVoiceMailBoxNumber(); |
|
56 void t_swapDefaultNumber(); |
|
57 |
|
58 // tests for private implementation |
|
59 void t_handleDivertingChanged(); |
|
60 void t_handleDivertingStatus(); |
|
61 void t_handleDivertingError(); |
|
62 void t_handleCFRequesting(); |
|
63 void t_setEngineContact(); |
|
64 void t_handleEmergencyDial(); |
|
65 |
|
66 void t_convertPsCallDivertingCondition(); |
|
67 void t_convertPsCallDivertingStatus(); |
|
68 void t_convertPsCallDivertingSetting(); |
|
69 void t_exceptionSafety(); |
|
70 |
|
71 private: |
|
72 |
|
73 void simulateLeaveOnMockMethodCallL(); |
|
74 |
|
75 private: |
|
76 PSetCallDivertingWrapper *mWrapper; |
|
77 CPsetContainer *mSetContainerMock; |
|
78 CPsetCallDiverting *mPsetCallDivertingMock; |
|
79 }; |
|
80 |
|
81 #endif |