39 */ |
38 */ |
40 TVerdict CTestSchemeSending::doTestStepPostambleL() |
39 TVerdict CTestSchemeSending::doTestStepPostambleL() |
41 { |
40 { |
42 delete iSmsMessage; |
41 delete iSmsMessage; |
43 iSmsMessage = NULL; |
42 iSmsMessage = NULL; |
44 |
43 |
45 __UHEAP_MARKEND; |
44 CSmsStatusReportSchemeTestStep::doTestStepPostambleL(); |
46 |
|
47 CTestStatusReportScheme::doTestStepPostambleL(); |
|
48 |
45 |
49 return TestStepResult(); |
46 return TestStepResult(); |
50 } |
47 } |
51 |
48 |
52 |
|
53 /** |
49 /** |
54 Get the TP-SRR operations on the SMS |
50 Get the TP-SRR operations on the SMS |
55 */ |
51 */ |
56 TVerdict CTestSendingTPSRRScheme::doTestStepPreambleL() |
52 TVerdict CTestSendingTPSRRScheme::doTestStepPreambleL() |
57 { |
53 { |
58 //Call the base class preamble |
54 //Call the base class preamble |
59 CTestSchemeSending::doTestStepPreambleL(); |
55 CTestSchemeSending::doTestStepPreambleL(); |
60 |
56 |
61 INFO_PRINTF1(_L("Test sending a message with TP-SRR scheme")); |
57 INFO_PRINTF1(_L("Test sending a message with TP-SRR scheme")); |
62 |
58 |
63 return TestStepResult(); |
59 return TestStepResult(); |
64 } |
60 } |
65 |
|
66 |
|
67 |
61 |
68 /** |
62 /** |
69 SIM TSY verifies the message sent |
63 SIM TSY verifies the message sent |
70 */ |
64 */ |
71 TVerdict CTestSendingTPSRRScheme::doTestStepL() |
65 TVerdict CTestSendingTPSRRScheme::doTestStepL() |
72 { |
66 { |
73 SendSmsMessageL(); |
67 SendSmsMessageL(); |
74 |
68 |
75 return TestStepResult(); |
69 return TestStepResult(); |
76 } |
70 } |
77 |
|
78 |
71 |
79 /** |
72 /** |
80 Send the message |
73 Send the message |
81 */ |
74 */ |
82 TVerdict CTestSendingTPSRRScheme::doTestStepPostambleL() |
75 TVerdict CTestSendingTPSRRScheme::doTestStepPostambleL() |
83 { |
76 { |
84 //Call the base class preamble |
77 //Call the base class preamble |
85 CTestSchemeSending::doTestStepPostambleL(); |
78 CTestSchemeSending::doTestStepPostambleL(); |
86 |
79 |
87 return TestStepResult(); |
80 return TestStepResult(); |
88 } |
81 } |
89 |
|
90 |
82 |
91 /** |
83 /** |
92 Get the SMSC operations on the SMS |
84 Get the SMSC operations on the SMS |
93 */ |
85 */ |
94 TVerdict CTestSendingSMSCScheme::doTestStepPreambleL() |
86 TVerdict CTestSendingSMSCScheme::doTestStepPreambleL() |
95 { |
87 { |
96 //Call the base class preamble |
88 //Call the base class preamble |
97 CTestSchemeSending::doTestStepPreambleL(); |
89 CTestSchemeSending::doTestStepPreambleL(); |
98 |
90 |
99 INFO_PRINTF1(_L("Test sending a message with SMSC scheme")); |
91 INFO_PRINTF1(_L("Test sending a message with SMSC scheme")); |
100 |
92 |
101 return TestStepResult(); |
93 return TestStepResult(); |
102 } |
94 } |
103 |
|
104 |
|
105 |
95 |
106 /** |
96 /** |
107 SIM TSY verifies the message sent |
97 SIM TSY verifies the message sent |
108 */ |
98 */ |
109 TVerdict CTestSendingSMSCScheme::doTestStepL() |
99 TVerdict CTestSendingSMSCScheme::doTestStepL() |
110 { |
100 { |
111 SendSmsMessageL(); |
101 SendSmsMessageL(); |
112 |
102 |
113 return TestStepResult(); |
103 return TestStepResult(); |
114 } |
104 } |
115 |
105 |
116 |
106 |
117 /** |
107 /** |
118 Send the message |
108 Send the message |
119 */ |
109 */ |
120 TVerdict CTestSendingSMSCScheme::doTestStepPostambleL() |
110 TVerdict CTestSendingSMSCScheme::doTestStepPostambleL() |
121 { |
111 { |
122 //Call the base class preamble |
112 //Call the base class preamble |
123 CTestSchemeSending::doTestStepPostambleL(); |
113 CTestSchemeSending::doTestStepPostambleL(); |
124 |
114 |
125 return TestStepResult(); |
115 return TestStepResult(); |
126 } |
116 } |
127 |
117 |
128 /** |
118 /** |
129 Preamble for all receiving test cases |
119 Preamble for all receiving test cases |
130 */ |
120 */ |
131 TVerdict CTestSchemeReceiving::doTestStepPreambleL() |
121 TVerdict CTestSchemeReceiving::doTestStepPreambleL() |
132 { |
122 { |
133 //Call base class preamble |
123 //Call base class preamble |
134 CTestStatusReportScheme::doTestStepPreambleL(); |
124 CSmsStatusReportSchemeTestStep::doTestStepPreambleL(); |
135 |
125 |
136 return TestStepResult(); |
126 return TestStepResult(); |
137 } |
127 } |
138 |
|
139 |
128 |
140 /** |
129 /** |
141 All receiving of status reports |
130 All receiving of status reports |
142 */ |
131 */ |
143 TVerdict CTestReceivingStatusReports::doTestStepPreambleL() |
132 TVerdict CTestReceivingStatusReports::doTestStepPreambleL() |
144 { |
133 { |
145 //Call base class preamble |
134 //Call base class preamble |
146 CTestSchemeReceiving::doTestStepPreambleL(); |
135 CTestSchemeReceiving::doTestStepPreambleL(); |
147 |
136 |
148 //Create a message |
|
149 __UHEAP_MARK; |
|
150 |
|
151 //Create SMS message from ini file specified as "message" |
137 //Create SMS message from ini file specified as "message" |
152 CreateSmsL(iDataCodingScheme ,_L("message")); |
138 CreateSmsL(iDataCodingScheme ,_L("message")); |
153 |
139 |
154 return TestStepResult(); |
140 return TestStepResult(); |
155 } |
141 } |
156 |
142 |
157 |
|
158 /** |
143 /** |
159 Receive a status report and return its status |
144 Receive a status report and return its status |
160 */ |
145 */ |
161 void CTestReceivingStatusReports::ReceiveStatusReportL(TSmsStatus::TSmsStatusValue& aStatus ) |
146 void CTestReceivingStatusReports::ReceiveStatusReportL(TSmsStatus::TSmsStatusValue& aStatus ) |
162 { |
147 { |
163 //Get the expectd status |
148 //Get the expectd status |
164 TInt intStatus; |
149 TInt intStatus; |
165 GetIntFromConfig(ConfigSection(), _L("status"), intStatus); |
150 GetIntFromConfig(ConfigSection(), _L("status"), intStatus); |
166 iExpectedStatus = (TSmsStatus::TSmsStatusValue)intStatus; |
151 iExpectedStatus = (TSmsStatus::TSmsStatusValue)intStatus; |
167 |
152 |
168 //Get the service center |
153 //Get the service center |
169 TSmsServiceCenterAddress telephoneNumber; |
154 TSmsServiceCenterAddress telephoneNumber; |
170 telephoneNumber.Copy( KTestNumber ); |
155 telephoneNumber.Copy( KTestNumber ); |
171 |
156 |
172 //Receive status report and return the status |
157 //Receive status report and return the status |
173 aStatus = RecvStatusReportL(telephoneNumber, iSocket); |
158 aStatus = RecvStatusReportL(telephoneNumber, iSocket); |
174 } |
159 } |
175 |
160 |
176 /** |
161 /** |
177 All receiving status reports tests do the same steps |
162 All receiving status reports tests do the same steps |
178 */ |
163 */ |
179 TVerdict CTestReceivingStatusReports::doTestStepL() |
164 TVerdict CTestReceivingStatusReports::doTestStepL() |
180 { |
165 { |
181 SendSmsMessageL(); |
166 SendSmsMessageL(); |
182 TSmsStatus::TSmsStatusValue status; |
167 TSmsStatus::TSmsStatusValue status; |
183 ReceiveStatusReportL(status); |
168 ReceiveStatusReportL(status); |
184 TESTL(status == iExpectedStatus); |
169 TESTL(status == iExpectedStatus); |
185 |
170 |
186 return TestStepResult(); |
171 return TestStepResult(); |
187 } |
172 } |
188 |
173 |
189 /** |
174 /** |
190 Delete the SMS |
175 Delete the SMS |
191 */ |
176 */ |
192 TVerdict CTestReceivingStatusReports::doTestStepPostambleL() |
177 TVerdict CTestReceivingStatusReports::doTestStepPostambleL() |
193 { |
178 { |
194 delete iSmsMessage; |
179 delete iSmsMessage; |
195 iSmsMessage = NULL; |
180 iSmsMessage = NULL; |
196 |
181 |
197 __UHEAP_MARKEND; |
182 CTestSchemeReceiving::doTestStepPostambleL(); |
198 |
183 |
199 CTestSchemeReceiving::doTestStepPostambleL(); |
184 return TestStepResult(); |
200 |
185 } |
201 return TestStepResult(); |
|
202 } |
|
203 |
|
204 |
186 |
205 /** |
187 /** |
206 All receiving of status reports |
188 All receiving of status reports |
207 */ |
189 */ |
208 TVerdict CTestReceivingMessages::doTestStepPreambleL() |
190 TVerdict CTestReceivingMessages::doTestStepPreambleL() |
209 { |
191 { |
210 //Call base class preamble |
192 //Call base class preamble |
211 CTestSchemeReceiving::doTestStepPreambleL(); |
193 CTestSchemeReceiving::doTestStepPreambleL(); |
212 |
194 |
213 //Create a message |
195 //Receive an SMS Message |
214 __UHEAP_MARK; |
196 WaitForRecvL(iSocket); |
215 |
197 iSmsMessage = RecvSmsL(iSocket); |
216 //Receive an SMS Message |
198 |
217 WaitForRecvL(iSocket); |
199 return TestStepResult(); |
218 iSmsMessage = RecvSmsL(iSocket); |
200 } |
219 |
|
220 return TestStepResult(); |
|
221 } |
|
222 |
|
223 |
201 |
224 /** |
202 /** |
225 Delete the SMS |
203 Delete the SMS |
226 */ |
204 */ |
227 TVerdict CTestReceivingMessages::doTestStepPostambleL() |
205 TVerdict CTestReceivingMessages::doTestStepPostambleL() |
228 { |
206 { |
229 delete iSmsMessage; |
207 delete iSmsMessage; |
230 iSmsMessage = NULL; |
208 iSmsMessage = NULL; |
231 |
209 |
232 __UHEAP_MARKEND; |
210 CTestSchemeReceiving::doTestStepPostambleL(); |
233 |
211 |
234 CTestSchemeReceiving::doTestStepPostambleL(); |
212 return TestStepResult(); |
235 |
213 } |
236 return TestStepResult(); |
|
237 } |
|