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_PSETCALLBARRINGWRAPPER_H |
|
19 #define UT_PSETCALLBARRINGWRAPPER_H |
|
20 |
|
21 #include <QtTest/QtTest> |
|
22 #include <mockservice.h> |
|
23 |
|
24 class CPsetContainer; |
|
25 class PSetCallBarringWrapper; |
|
26 |
|
27 class UT_PSetCallBarringWrapper : public QObject, public MockService |
|
28 { |
|
29 Q_OBJECT |
|
30 |
|
31 public: |
|
32 |
|
33 UT_PSetCallBarringWrapper(); |
|
34 ~UT_PSetCallBarringWrapper(); |
|
35 |
|
36 private slots: |
|
37 |
|
38 void init(); |
|
39 void cleanup(); |
|
40 |
|
41 void t_construction(); |
|
42 void t_barringStatus(); |
|
43 void t_barringStatusExceptionOccurs(); |
|
44 void t_enableBarring(); |
|
45 void t_disableBarring(); |
|
46 void t_changeBarringPassword(); |
|
47 |
|
48 // private implementation tests |
|
49 void t_HandleBarringModeStatusL(); |
|
50 void t_HandleBarringModeStatusNoBasicServiceGroupIdsL(); |
|
51 |
|
52 void t_HandleBarringModeChangedL(); |
|
53 void t_HandleBarringErrorL(); |
|
54 void t_HandleCBRequestingL(); |
|
55 void t_SetEngineContact(); |
|
56 void t_CbPasswordChangedL(); |
|
57 |
|
58 void t_enableBarringRequestComplete(); |
|
59 void t_disableBarringRequestComplete(); |
|
60 void t_changeBarringPasswordRequestComplete(); |
|
61 void t_RequestStatusChanged(); |
|
62 |
|
63 void t_exceptionSafety(); |
|
64 |
|
65 private: |
|
66 |
|
67 void simulateLeaveAtMockMethodCall(); |
|
68 |
|
69 private: |
|
70 |
|
71 CPsetContainer *m_psetContainerMock; |
|
72 PSetCallBarringWrapper* m_wrapper; |
|
73 }; |
|
74 |
|
75 #endif // UT_PSETCALLBARRINGWRAPPER_H |
|