cbsref/telephonyrefplugins/atltsy/integrationtest/src/testltsygetphonebatterycap.cpp
equal
deleted
inserted
replaced
|
1 // TestLtsyGetPhoneBatteryCap.cpp |
|
2 // Copyright (c) Symbian Software Ltd 2008. All rights reserved. |
|
3 // |
|
4 // Implementation of the Class CTestLtsyGetPhoneBatteryCap |
|
5 |
|
6 //system include |
|
7 #include <etelmm.h> |
|
8 #include <e32std.h> |
|
9 |
|
10 //user include |
|
11 |
|
12 #include "TestLtsyGetPhoneBatteryCap.h" |
|
13 |
|
14 |
|
15 /** Supported battery information capabilities. The supported |
|
16 * capabilities are returned to the client when it requests them by calling |
|
17 * CMmPhoneTsy::GetBatteryCaps() |
|
18 */ |
|
19 /** |
|
20 * Constructor |
|
21 * |
|
22 */ |
|
23 CTestLtsyGetPhoneBatteryCap::CTestLtsyGetPhoneBatteryCap(CTestLtsyModel& aModel) |
|
24 : CTestLtsyPhoneStepBase(aModel) |
|
25 { |
|
26 } |
|
27 |
|
28 /** |
|
29 * Destructor |
|
30 * |
|
31 */ |
|
32 CTestLtsyGetPhoneBatteryCap::~CTestLtsyGetPhoneBatteryCap() |
|
33 { |
|
34 } |
|
35 |
|
36 /** |
|
37 * Invoked by the test execute framework for exercising functionality under test |
|
38 * @return EPass: The test passed succesfully; |
|
39 EFail: The test failed; |
|
40 EInconclusive: The result of the test was inconclusive; |
|
41 ETestSuiteError: Error in the test suite; |
|
42 EAbort: The test was aborted; |
|
43 EIgnore: The test was unexecuted |
|
44 */ |
|
45 TVerdict CTestLtsyGetPhoneBatteryCap::doTestStepL() |
|
46 { |
|
47 INFO_PRINTF1(_L("CTestLtsyGetPhoneInfo::doTestStepL Begin")); |
|
48 if (TestStepResult() == EPass) |
|
49 { |
|
50 TRAPD(err,GetBatteryCaps()); |
|
51 if(err != KErrNone) |
|
52 { |
|
53 ERR_PRINTF2(_L("The error was returned %d!! when open Phone"),err); |
|
54 SetTestStepResult(EFail); |
|
55 } |
|
56 } |
|
57 return TestStepResult(); |
|
58 } |
|
59 |