|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 // INCLUDES |
|
19 #include "ctlbsclientpostp223.h" |
|
20 #include <badesca.h> |
|
21 #include <lbs/epos_cposmodules.h> |
|
22 #include <lbs/epos_cposmoduleupdate.h> |
|
23 #include <lbs/epos_cposmoduleidlist.h> |
|
24 #include <lbscommon.h> |
|
25 #include <lbspositioninfo.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // ================= MEMBER FUNCTIONS ======================= |
|
30 |
|
31 // Constructor. |
|
32 CT_LbsClientPosTp223::CT_LbsClientPosTp223(CT_LbsServer& aParent): CT_LbsPortedStepBase(aParent) |
|
33 { |
|
34 _LIT(KTestName, "TP223 - Range check in PSY"); |
|
35 SetTestStepName(KTestName); |
|
36 } |
|
37 |
|
38 // --------------------------------------------------------- |
|
39 // Destructor. |
|
40 // --------------------------------------------------------- |
|
41 CT_LbsClientPosTp223::~CT_LbsClientPosTp223() |
|
42 { |
|
43 } |
|
44 |
|
45 |
|
46 // --------------------------------------------------------- |
|
47 // CT_LbsClientPosTp223::StartL |
|
48 // |
|
49 // (other items were commented in a header). |
|
50 // --------------------------------------------------------- |
|
51 // |
|
52 void CT_LbsClientPosTp223::StartL() |
|
53 { |
|
54 |
|
55 _LIT(KErrorMsg, "Get Module did not return KErrNotFound, error code = %d"); |
|
56 CPosModules* db = CPosModules::OpenL(); |
|
57 CleanupStack::PushL(db); |
|
58 |
|
59 TPositionModuleInfo moduleInfo; |
|
60 |
|
61 TRAPD(err,db->GetModuleInfoL(iUidTestRangePsy, |
|
62 moduleInfo)); |
|
63 |
|
64 AssertTrueSecL(err == KErrNotFound,KErrorMsg, err); |
|
65 |
|
66 CleanupStack::PopAndDestroy(db); // db |
|
67 |
|
68 } |
|
69 |
|
70 |
|
71 // --------------------------------------------------------- |
|
72 // CT_LbsClientPosTp223::AssertTrueSecL |
|
73 // |
|
74 // (other items were commented in a header). |
|
75 // --------------------------------------------------------- |
|
76 // |
|
77 void CT_LbsClientPosTp223::AssertTrueSecL(TBool aCondition, const TDesC& aErrorMsg, TInt aErrorCode) |
|
78 { |
|
79 if (!aCondition) |
|
80 { |
|
81 TBuf<100> buf; |
|
82 buf.Format(aErrorMsg, aErrorCode); |
|
83 LogErrorAndLeaveL(buf); |
|
84 } |
|
85 } |
|
86 |
|
87 |