|
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 // Example CTestStep derived implementation |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file CTestLtsySmsControlReceiveSmsCase1Step.cpp |
|
20 @internalTechnology |
|
21 */ |
|
22 #include "testltsysmscontrolreceivesmscase1step.h" |
|
23 #include "te_integration_stltsysuitedefs.h" |
|
24 |
|
25 CCTestLtsySmsControlReceiveSmsCase1Step::~CCTestLtsySmsControlReceiveSmsCase1Step() |
|
26 /** |
|
27 * Destructor |
|
28 */ |
|
29 { |
|
30 } |
|
31 |
|
32 CCTestLtsySmsControlReceiveSmsCase1Step::CCTestLtsySmsControlReceiveSmsCase1Step() |
|
33 /** |
|
34 * Constructor |
|
35 */ |
|
36 { |
|
37 // **MUST** call SetTestStepName in the constructor as the controlling |
|
38 // framework uses the test step name immediately following construction to set |
|
39 // up the step's unique logging ID. |
|
40 SetTestStepName(KCTestLtsySmsControlReceiveSmsCase1Step); |
|
41 } |
|
42 |
|
43 TVerdict CCTestLtsySmsControlReceiveSmsCase1Step::doTestStepPreambleL() |
|
44 /** |
|
45 * @return - TVerdict code |
|
46 * Override of base class virtual |
|
47 */ |
|
48 { |
|
49 INFO_PRINTF1(_L("Please delete this line or modify it. I am in Test Step Preamble in Class CCTestLtsySmsControlReceiveSmsCase1Step")); |
|
50 // uncomment the following 3 lines if you have common pre setting to all the test steps in there |
|
51 // CTe_integration_stltsySuiteStepBase::doTestStepPreambleL(); |
|
52 // if (TestStepResult()!=EPass) |
|
53 // return TestStepResult(); |
|
54 // process some pre setting to this test step then set SetTestStepResult to EFail or Epass. |
|
55 SetTestStepResult(EPass); |
|
56 return TestStepResult(); |
|
57 } |
|
58 |
|
59 |
|
60 TVerdict CCTestLtsySmsControlReceiveSmsCase1Step::doTestStepL() |
|
61 /** |
|
62 * @return - TVerdict code |
|
63 * Override of base class pure virtual |
|
64 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
65 * not leave. That being the case, the current test result value will be EPass. |
|
66 */ |
|
67 { |
|
68 if (TestStepResult()==EPass) |
|
69 { |
|
70 |
|
71 // ************** Delete the Block, the block start **************** |
|
72 INFO_PRINTF1(_L("Please modify me. I am in CCTestLtsySmsControlReceiveSmsCase1Step::doTestStepL() in the file CTestLtsySmsControlReceiveSmsCase1Step.cpp")); //Block start |
|
73 TPtrC TheString; |
|
74 TBool TheBool; |
|
75 TInt TheInt; |
|
76 if(!GetStringFromConfig(ConfigSection(),KTe_integration_stltsySuiteString, TheString) || |
|
77 !GetBoolFromConfig(ConfigSection(),KTe_integration_stltsySuiteBool,TheBool) || |
|
78 !GetIntFromConfig(ConfigSection(),KTe_integration_stltsySuiteInt,TheInt) |
|
79 ) |
|
80 { |
|
81 // Leave if there's any error. |
|
82 User::Leave(KErrNotFound); |
|
83 } |
|
84 else |
|
85 { |
|
86 INFO_PRINTF4(_L("The test step is %S, The Bool is %d, The int-value is %d"), &TheString, TheBool,TheInt); // Block end |
|
87 } |
|
88 |
|
89 // ************** Block end **************** |
|
90 |
|
91 SetTestStepResult(EPass); |
|
92 } |
|
93 return TestStepResult(); |
|
94 } |
|
95 |
|
96 |
|
97 |
|
98 TVerdict CCTestLtsySmsControlReceiveSmsCase1Step::doTestStepPostambleL() |
|
99 /** |
|
100 * @return - TVerdict code |
|
101 * Override of base class virtual |
|
102 */ |
|
103 { |
|
104 INFO_PRINTF1(_L("Please delete this line or modify it. I am in Test Step Postamble in Class CCTestLtsySmsControlReceiveSmsCase1Step")); |
|
105 // process something post setting to the test step |
|
106 // uncomment the following line if you have common post setting to all the test steps in there |
|
107 // CTe_integration_stltsySuiteStepBase::doTestStepPostambleL(); |
|
108 // uncomment the following line if you have post process or remove the following line if no post process |
|
109 // SetTestStepResult(EPass); // or EFail |
|
110 return TestStepResult(); |
|
111 } |