|
1 // Copyright (c) 2005-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 #include "cteststepbtromconfigmanager002.h" |
|
17 #include <btmanclient.h> |
|
18 |
|
19 CTestStepBtRomConfigManager002::~CTestStepBtRomConfigManager002() |
|
20 { |
|
21 } |
|
22 |
|
23 CTestStepBtRomConfigManager002::CTestStepBtRomConfigManager002 |
|
24 (CTestServer& aParent) |
|
25 : CTestStepBtRomConfigBase(aParent) |
|
26 { |
|
27 SetTestStepName(KTestNameManager002); |
|
28 } |
|
29 |
|
30 /** |
|
31 Static Constructor |
|
32 Note the lack of ELeave. This means that having insufficient memory will return NULL; |
|
33 */ |
|
34 CTestStepBtRomConfigManager002* CTestStepBtRomConfigManager002::New |
|
35 (CTestServer& aParent) |
|
36 { |
|
37 return new CTestStepBtRomConfigManager002(aParent); |
|
38 } |
|
39 |
|
40 /** |
|
41 See BT_ROMCONFIG_MANAGER_002.script |
|
42 */ |
|
43 TVerdict CTestStepBtRomConfigManager002::doTestStepL() |
|
44 { |
|
45 INFO_PRINTF1(\ |
|
46 _L(">>CTestStepBtRomConfigManager002::doTestStepL()")); |
|
47 |
|
48 const TInt expectedError = ( iBtExcluded ? KErrNotFound : KErrNone ); |
|
49 // this is only used for logging readability purposes |
|
50 const TDesC* expectedErrorDesPtr = ( iBtExcluded ? &KErrNotFoundLit : &KErrNoneLit ); |
|
51 |
|
52 RBTRegServ btregserv; |
|
53 TInt err = btregserv.Connect(); |
|
54 if ( err!=expectedError ) |
|
55 { |
|
56 INFO_PRINTF4(\ |
|
57 _L("Failed: Expected %S(%d) and got %d when calling RBTRegServ::Connect"),\ |
|
58 expectedErrorDesPtr, expectedError, err); |
|
59 SetTestStepResult(EFail); |
|
60 } |
|
61 btregserv.Close(); // ideally we should check we have a handle, but it's private/protected? |
|
62 |
|
63 INFO_PRINTF1(\ |
|
64 _L("<<CTestStepBtRomConfigManager002::doTestStepL()")); |
|
65 CheckAndSetTestResult(); |
|
66 return TestStepResult(); |
|
67 } |
|
68 |
|
69 // EOF |