|
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 "cteststepbtromconfigmanager001.h" |
|
17 #include <btmanclient.h> |
|
18 |
|
19 CTestStepBtRomConfigManager001::~CTestStepBtRomConfigManager001() |
|
20 { |
|
21 } |
|
22 |
|
23 CTestStepBtRomConfigManager001::CTestStepBtRomConfigManager001 |
|
24 (CTestServer& aParent) |
|
25 : CTestStepBtRomConfigBase(aParent) |
|
26 { |
|
27 SetTestStepName(KTestNameManager001); |
|
28 } |
|
29 |
|
30 /** |
|
31 Static Constructor |
|
32 Note the lack of ELeave. This means that having insufficient memory will return NULL; |
|
33 */ |
|
34 CTestStepBtRomConfigManager001* CTestStepBtRomConfigManager001::New |
|
35 (CTestServer& aParent) |
|
36 { |
|
37 return new CTestStepBtRomConfigManager001(aParent); |
|
38 } |
|
39 |
|
40 /** |
|
41 See BT_ROMCONFIG_MANAGER_001.script |
|
42 */ |
|
43 TVerdict CTestStepBtRomConfigManager001::doTestStepL() |
|
44 { |
|
45 INFO_PRINTF1(\ |
|
46 _L(">>CTestStepBtRomConfigManager001::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 RBTMan btman; |
|
53 TInt err = btman.Connect(); |
|
54 if ( err!=expectedError ) |
|
55 { |
|
56 INFO_PRINTF4(\ |
|
57 _L("Failed: Expected %S(%d) and got %d when calling RBTMan::Connect"),\ |
|
58 expectedErrorDesPtr, expectedError, err); |
|
59 SetTestStepResult(EFail); |
|
60 } |
|
61 |
|
62 if ( btman.Handle() ) |
|
63 { |
|
64 btman.Close(); |
|
65 } |
|
66 |
|
67 INFO_PRINTF1(\ |
|
68 _L("<<CTestStepBtRomConfigManager001::doTestStepL()")); |
|
69 CheckAndSetTestResult(); |
|
70 return TestStepResult(); |
|
71 } |
|
72 |
|
73 // EOF |