24
|
1 |
// Copyright (c) 2007-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 |
// Test step definitions for the SmsMessaging functional unit.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@internalTechnology
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include "cctsyintegrationtestsmsmessaging.h"
|
|
23 |
#include "pcktcs.h"
|
|
24 |
#include "cctsyinidata.h"
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
CCTSYIntegrationTestSmsMessagingBase::CCTSYIntegrationTestSmsMessagingBase(CEtelSessionMgr& aEtelSessionMgr)
|
|
29 |
: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr),
|
|
30 |
iSmsMessagingTsyTestHelper(*this), iSmsStoreTsyTestHelper(*this), iNetworkTsyTestHelper(*this),
|
|
31 |
iPacketServiceTsyTestHelper(*this), iSimTsyTestHelper(*this), iCallControlTestHelper(*this)
|
|
32 |
/**
|
|
33 |
* Constructor
|
|
34 |
*/
|
|
35 |
{
|
|
36 |
}
|
|
37 |
|
|
38 |
CCTSYIntegrationTestSmsMessagingBase::~CCTSYIntegrationTestSmsMessagingBase()
|
|
39 |
/*
|
|
40 |
* Destructor
|
|
41 |
*/
|
|
42 |
{
|
|
43 |
}
|
|
44 |
|
|
45 |
void CCTSYIntegrationTestSmsMessagingBase::GetSmsServiceCentreAddressL(TPtrC &aServiceCentreAddress)
|
|
46 |
/*
|
|
47 |
* Gets the service centre address
|
|
48 |
*
|
|
49 |
* @param aServiceCentreAddress a reference to an descriptor that will hold the service address
|
|
50 |
*/
|
|
51 |
{
|
|
52 |
DEBUG_PRINTF1(_L("Attempting to get Service Centre Address"));
|
|
53 |
|
|
54 |
RMobilePhone &phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
55 |
|
|
56 |
// wait until we are on the network
|
|
57 |
CHECK_EQUALS_L( iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ), KErrNone,
|
|
58 |
_L("Network is unavailable") );
|
|
59 |
|
|
60 |
// Determine the network we are on
|
|
61 |
RMobilePhone::TMobilePhoneNetworkInfoV1 netInfo;
|
|
62 |
RMobilePhone::TMobilePhoneNetworkInfoV1Pckg netInfoPkg(netInfo);
|
|
63 |
RMobilePhone::TMobilePhoneLocationAreaV1 area;
|
|
64 |
TOperatorName operatorName = EOperatorUnknown;
|
|
65 |
TInt err = iNetworkTsyTestHelper.GetCurrentNetworkL( phone, netInfoPkg, area, operatorName );
|
|
66 |
|
|
67 |
CHECK_EQUALS_L( err, KErrNone, _L("RMobilePhone::GetCurrentNetwork failed to get current network id (1)"));
|
|
68 |
|
|
69 |
// Identify the network from the short name, read the service centre number from ini file
|
|
70 |
const TDesC* network = NULL;
|
|
71 |
switch ( operatorName )
|
|
72 |
{
|
|
73 |
case EOperatorO2:
|
|
74 |
network = &KNetworkO2;
|
|
75 |
break;
|
|
76 |
case EOperatorVodafone:
|
|
77 |
network = &KNetworkVodafone;
|
|
78 |
break;
|
|
79 |
case EOperatorNTN:
|
|
80 |
network = &KNetworkNTN;
|
|
81 |
break;
|
|
82 |
case EOperatorOrange:
|
|
83 |
network = &KNetworkOrange;
|
|
84 |
break;
|
|
85 |
case EOperatorTMobile:
|
|
86 |
network = &KNetworkTMobile;
|
|
87 |
break;
|
|
88 |
case EOperatorUnknown:
|
|
89 |
default:
|
|
90 |
CHECK_TRUE_L( EFail, _L("Failed to identify current network"));
|
|
91 |
break;
|
|
92 |
}
|
|
93 |
|
|
94 |
// Get the service centre from the ini file
|
|
95 |
TBool gotServiceCentre = GetStringFromConfig( KServiceCentreSection, *network, aServiceCentreAddress );
|
|
96 |
|
|
97 |
CHECK_TRUE_L( gotServiceCentre, _L("Failed to read service centre from INI file"));
|
|
98 |
}
|
|
99 |
|
|
100 |
|
|
101 |
void CCTSYIntegrationTestSmsMessagingBase::SetSmsBearerL(RMobileSmsMessaging &aSmsMessaging, RMobileSmsMessaging::TMobileSmsBearer aBearer)
|
|
102 |
/**
|
|
103 |
* Ensure the SMS Bearer is set to the specified bearer.
|
|
104 |
* CTSY does not support Getting the Sms Bearer. Neither does it support being notified of a change
|
|
105 |
* in the Sms Bearer.
|
|
106 |
*
|
|
107 |
* @param aSmsMessaging a reference to the messeging session
|
|
108 |
* @param aBearer the bearer
|
|
109 |
*/
|
|
110 |
{
|
|
111 |
|
|
112 |
TExtEtelRequestStatus setBearerStatus(aSmsMessaging, EMobileSmsMessagingSetMoSmsBearer);
|
|
113 |
CleanupStack::PushL(setBearerStatus);
|
|
114 |
aSmsMessaging.SetMoSmsBearer(setBearerStatus, aBearer);
|
|
115 |
CHECK_EQUALS_L(WaitForRequestWithTimeOut(setBearerStatus, ETimeLong), KErrNone,
|
|
116 |
_L("RMobileSmsMessaging::SetMoSmsBearer timed-out"));
|
|
117 |
|
|
118 |
//setBearerStatus
|
|
119 |
CleanupStack::PopAndDestroy(&setBearerStatus);
|
|
120 |
}
|
|
121 |
|
|
122 |
|
|
123 |
void CCTSYIntegrationTestSmsMessagingBase::GetSmsSendAttributesL(RMobileSmsMessaging::TMobileSmsSendAttributesV1 &aSendSmsAttributes,TBool aCallToSelf)
|
|
124 |
/**
|
|
125 |
* Get the attributes for sending an Sms Message
|
|
126 |
*
|
|
127 |
* @param aSendSmsAttributes the message attribute.
|
|
128 |
* @param aCallToSelf ETrue if the calling number will be the ONStore number, EFalse if the number will be the SmsReceptor in the ini file.
|
|
129 |
*
|
|
130 |
*/
|
|
131 |
{
|
|
132 |
RMobilePhone::TMobileAddress destinationNumber;
|
|
133 |
if(aCallToSelf)
|
|
134 |
{
|
|
135 |
destinationNumber.iTelNumber = iOwnNumbersCache.OwnNumbers().OwnVoiceNumber();
|
|
136 |
if(destinationNumber.iTelNumber.Length()==0)
|
|
137 |
{
|
|
138 |
DEBUG_PRINTF1(_L("Since ONStore fails, we read this from the ini file."));
|
|
139 |
TPtrC mobileNumber;
|
|
140 |
GetStringFromConfig(KIniOwnNumSection, KIniOwnVoiceNumber1, mobileNumber);
|
|
141 |
destinationNumber.iTelNumber=mobileNumber;
|
|
142 |
}
|
|
143 |
}
|
|
144 |
else
|
|
145 |
{
|
|
146 |
//Read the destination and number from ini file
|
|
147 |
TPtrC mobileNumber;
|
|
148 |
GetStringFromConfig(ConfigSection(), _L("SmsReceptor"), mobileNumber);
|
|
149 |
destinationNumber.iTelNumber=mobileNumber;
|
|
150 |
}
|
|
151 |
|
|
152 |
DEBUG_PRINTF2(_L("Calling to %S"),&destinationNumber.iTelNumber);
|
|
153 |
destinationNumber.iTypeOfNumber = RMobilePhone::EInternationalNumber;
|
|
154 |
destinationNumber.iNumberPlan = RMobilePhone::EIsdnNumberPlan;
|
|
155 |
aSendSmsAttributes.iDestination = destinationNumber;
|
|
156 |
|
|
157 |
//Read the Service Centre from ini file based on network
|
|
158 |
RMobilePhone::TMobileAddress serviceCentre;
|
|
159 |
TPtrC serviceCentreNumber;
|
|
160 |
GetSmsServiceCentreAddressL(serviceCentreNumber);
|
|
161 |
serviceCentre.iTelNumber = serviceCentreNumber;
|
|
162 |
serviceCentre.iTypeOfNumber = RMobilePhone::EInternationalNumber;
|
|
163 |
serviceCentre.iNumberPlan = RMobilePhone::EIsdnNumberPlan;
|
|
164 |
aSendSmsAttributes.iGsmServiceCentre = serviceCentre;
|
|
165 |
aSendSmsAttributes.iMore = EFalse;
|
|
166 |
aSendSmsAttributes.iDataFormat = RMobileSmsMessaging::EFormatGsmTpdu;
|
|
167 |
aSendSmsAttributes.iSubmitReport.SetLength(0);
|
|
168 |
|
|
169 |
//Set iFlags to show which attributes are pressent
|
|
170 |
aSendSmsAttributes.iFlags = RMobileSmsMessaging::KGsmServiceCentre | RMobileSmsMessaging::KSmsDataFormat | RMobileSmsMessaging::KRemotePartyInfo | RMobileSmsMessaging::KMoreToSend;
|
|
171 |
|
|
172 |
}
|
|
173 |
|
|
174 |
|
|
175 |
RMobileSmsMessaging::TMobileSmsGsmTpdu CCTSYIntegrationTestSmsMessagingBase::CreateValidSmsMessageL(TDes8 &aText,
|
|
176 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1& aSendSmsAttributes,
|
|
177 |
TSmsStoreTsyTestHelper::TDataCodingScheme aDataCodingScheme,
|
|
178 |
TBool aIsToSelf,
|
|
179 |
TBool aStatusReportRequest)
|
|
180 |
/**
|
|
181 |
* Create an SMS PDU from a string
|
|
182 |
*
|
|
183 |
* @param aText the message body.
|
|
184 |
* @param aSendSmsAttributes the message attribute.
|
|
185 |
* @param aDataCodingScheme the data coding scheme
|
|
186 |
* @param aIsToSelf ETrue if the message should be sent into the own sim number, EFalse will be send to a ini file specific number
|
|
187 |
* @param aStatusReportRequest will be true if the TP-SRI bit (status request indicator) should be on.
|
|
188 |
*
|
|
189 |
* @return - The constructed message PDU.
|
|
190 |
*
|
|
191 |
*/
|
|
192 |
{
|
|
193 |
|
|
194 |
GetSmsSendAttributesL(aSendSmsAttributes,aIsToSelf);
|
|
195 |
|
|
196 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu;
|
|
197 |
TPtrC16 pNumber = aSendSmsAttributes.iDestination.iTelNumber;
|
|
198 |
iSmsStoreTsyTestHelper.CreateValidSmsPdu(aText, pNumber, pdu, aDataCodingScheme, aStatusReportRequest);
|
|
199 |
|
|
200 |
return pdu;
|
|
201 |
}
|
|
202 |
|
|
203 |
|
|
204 |
TBool CCTSYIntegrationTestSmsMessagingBase::ComparePDUs(RMobileSmsMessaging::TMobileSmsGsmTpdu &aRecieved, RMobileSmsMessaging::TMobileSmsGsmTpdu &aSent)
|
|
205 |
/*
|
|
206 |
* Helper function, which will compare two PDU's, a Deliver and submit and return false if they are not the same
|
|
207 |
* It compare the message length, the message class and the message text.
|
|
208 |
*
|
|
209 |
* @param aRecieved the PDU that was recieved.
|
|
210 |
* @param aSent the PDU that was sent.
|
|
211 |
*
|
|
212 |
* @return - Returns ETrue iff both PDU contains the same information.
|
|
213 |
*
|
|
214 |
*/
|
|
215 |
{
|
|
216 |
TUint recivedSize = aRecieved.Length();
|
|
217 |
TUint sentSize = aSent.Length();
|
|
218 |
ASSERT_TRUE(recivedSize>3,_L("CCTSYIntegrationTestSmsMessagingBase::ComparePDUs illeagal PDU length"));
|
|
219 |
ASSERT_TRUE(sentSize>2,_L("CCTSYIntegrationTestSmsMessagingBase::ComparePDUs illeagal PDU length"));
|
|
220 |
if((recivedSize<=3)||(sentSize<=2))
|
|
221 |
{
|
|
222 |
return EFalse;
|
|
223 |
}
|
|
224 |
TUint sizeOfRecvTPOA = (TUint)aRecieved[1]/2 + 2; //number is given in 4 bits, another bit is for the length and another is for the type
|
|
225 |
TUint sizeOfSentTPOA = (TUint)aSent[2]/2 + 2; //number is given in 4 bits, another bit is for the length and another is for the type
|
|
226 |
|
|
227 |
ASSERT_TRUE(recivedSize>sizeOfRecvTPOA+12,_L("CCTSYIntegrationTestSmsMessagingBase::ComparePDUs illeagal PDU length"));
|
|
228 |
ASSERT_TRUE(sentSize>sizeOfSentTPOA+7,_L("CCTSYIntegrationTestSmsMessagingBase::ComparePDUs illeagal PDU length"));
|
|
229 |
if((recivedSize<=sizeOfRecvTPOA+12)||(sentSize<=sizeOfSentTPOA+7))
|
|
230 |
{
|
|
231 |
return EFalse;
|
|
232 |
}
|
|
233 |
ASSERT_EQUALS(aRecieved[sizeOfRecvTPOA+2],aSent[sizeOfSentTPOA+3],_L("RMobileSmsMessaging::ReceiveMessage did not returned the correct class message"));
|
|
234 |
ASSERT_EQUALS(aRecieved[sizeOfRecvTPOA+10],aSent[sizeOfSentTPOA+5],_L("RMobileSmsMessaging::ReceiveMessage did not returned the same message length"));
|
|
235 |
if((aRecieved[sizeOfRecvTPOA+2]!=aSent[sizeOfSentTPOA+3])||(aRecieved[sizeOfRecvTPOA+10]!=aSent[sizeOfSentTPOA+5]))
|
|
236 |
{
|
|
237 |
return EFalse;
|
|
238 |
}
|
|
239 |
TInt offset= 5-sizeOfSentTPOA+sizeOfRecvTPOA;
|
|
240 |
TBuf<200> sentext;
|
|
241 |
ASSERT_TRUE(iSmsStoreTsyTestHelper.ToText(sentext,aSent,EFalse),_L("RMobileSmsMessaging::ReceiveMessage sent unreadable text"));
|
|
242 |
TBuf<200> rectext;
|
|
243 |
ASSERT_TRUE(iSmsStoreTsyTestHelper.ToText(rectext,aRecieved,ETrue),_L("RMobileSmsMessaging::ReceiveMessage got unreadable text"));
|
|
244 |
ASSERT_EQUALS(recivedSize,sentSize+offset,_L("RMobileSmsMessaging::ReceiveMessage got the wrong message length"));
|
|
245 |
ASSERT_EQUALS_DES16(rectext,sentext,_L("RMobileSmsMessaging::ReceiveMessage did not returned the same text"));
|
|
246 |
if(rectext!=sentext)
|
|
247 |
{
|
|
248 |
return EFalse;
|
|
249 |
}
|
|
250 |
return ETrue;
|
|
251 |
}
|
|
252 |
|
|
253 |
CCTSYIntegrationTestSmsMessaging0001::CCTSYIntegrationTestSmsMessaging0001(CEtelSessionMgr& aEtelSessionMgr)
|
|
254 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
255 |
/**
|
|
256 |
* Constructor.
|
|
257 |
*/
|
|
258 |
{
|
|
259 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0001::GetTestStepName());
|
|
260 |
}
|
|
261 |
|
|
262 |
CCTSYIntegrationTestSmsMessaging0001::~CCTSYIntegrationTestSmsMessaging0001()
|
|
263 |
/**
|
|
264 |
* Destructor.
|
|
265 |
*/
|
|
266 |
{
|
|
267 |
}
|
|
268 |
|
|
269 |
TVerdict CCTSYIntegrationTestSmsMessaging0001::doTestStepL()
|
|
270 |
/**
|
|
271 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0001
|
|
272 |
* @SYMFssID BA/CTSY/SMSM-0001
|
|
273 |
* @SYMTestCaseDesc Get message store information.
|
|
274 |
* @SYMTestPriority High
|
|
275 |
* @SYMTestActions RMobileSmsMessaging::GetMessageStoreInfo
|
|
276 |
* @SYMTestExpectedResults Pass - Number of message stores and message store info. returned are correct.
|
|
277 |
* @SYMTestType CIT
|
|
278 |
* @SYMTestCaseDependencies live/automatic
|
|
279 |
*
|
|
280 |
* Reason for test: Verify number of message stores and message store details are correct.
|
|
281 |
*
|
|
282 |
* @return - TVerdict code
|
|
283 |
*/
|
|
284 |
{
|
|
285 |
|
|
286 |
//
|
|
287 |
// SET UP
|
|
288 |
//
|
|
289 |
|
|
290 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
291 |
|
|
292 |
//
|
|
293 |
// SET UP END
|
|
294 |
//
|
|
295 |
|
|
296 |
StartTest();
|
|
297 |
|
|
298 |
//
|
|
299 |
// TEST START
|
|
300 |
//
|
|
301 |
|
|
302 |
|
|
303 |
// Check RMobileSmsMessaging::EnumerateMessageStores returns aCount=1
|
|
304 |
TInt numOfMessages = 0;
|
|
305 |
smsMessaging.EnumerateMessageStores(numOfMessages);
|
|
306 |
ASSERT_TRUE(numOfMessages > 0,_L("RMobileSmsMessaging::EnumerateMessageStores returned with error."));
|
|
307 |
|
|
308 |
// Check RMobileSmsMessaging::GetMessageStoreInfo with aIndex=0 returns
|
|
309 |
// TMobilePhoneStoreInfoV1::iCaps of
|
|
310 |
// RMobilePhoneStore::KCapsIndividualEntry
|
|
311 |
// | RMobilePhoneStore::KCapsDeleteAll
|
|
312 |
// | RMobilePhoneStore::KCapsReadAccess
|
|
313 |
// | RMobilePhoneStore::KCapsWriteAccess
|
|
314 |
// | RMobilePhoneStore::KCapsNotifyEvent
|
|
315 |
// | RMobilePhoneStore::KCapsWholeStore
|
|
316 |
TInt index = 0;
|
|
317 |
TExtEtelRequestStatus smsStoreInfoRequest(smsMessaging,EMobilePhoneGetPhoneStoreInfo);
|
|
318 |
CleanupStack::PushL(smsStoreInfoRequest);
|
|
319 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1 smsStoreInfo;
|
|
320 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg smsStorePkg(smsStoreInfo);
|
|
321 |
smsMessaging.GetMessageStoreInfo(smsStoreInfoRequest, index, smsStorePkg);
|
|
322 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(smsStoreInfoRequest, ETimeLong),
|
|
323 |
KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out."));
|
|
324 |
TUint32 expectedCaps = RMobilePhoneStore::KCapsIndividualEntry | RMobilePhoneStore::KCapsDeleteAll
|
|
325 |
| RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess
|
|
326 |
| RMobilePhoneStore::KCapsNotifyEvent | RMobilePhoneStore::KCapsWholeStore;
|
|
327 |
ASSERT_BITS_SET(smsStoreInfo.iCaps, expectedCaps, KNoUnwantedBits, _L("RMobilePhone::GetSecurityCaps completed with incorrect caps."));
|
|
328 |
|
|
329 |
|
|
330 |
// Check RMobileSmsMessaging::GetMessageStoreInfo with aIndex=0 returns TMobilePhoneStoreInfoV1::iName = KETelIccSmsStore
|
|
331 |
// Check RMobileSmsMessaging::GetMessageStoreInfo with aIndex=0 returns TMobilePhoneStoreInfoV1::iTotalEntries > 0
|
|
332 |
// Check RMobileSmsMessaging::GetMessageStoreInfo with aIndex=0 returns TMobilePhoneStoreInfoV1::iType = RMobilePhoneStore::EShortMessageStore
|
|
333 |
// Check RMobileSmsMessaging::GetMessageStoreInfo with aIndex=0 returns TMobilePhoneStoreInfoV1::iUsedEntries >= 0
|
|
334 |
DEBUG_PRINTF2(_L("SMS store name is %S"), &smsStoreInfo.iName);
|
|
335 |
ASSERT_EQUALS_DES16(smsStoreInfo.iName, KETelIccSmsStore, _L("RMobileSmsMessaging::GetMessageStoreInfo returned with incorrect name."));
|
|
336 |
ASSERT_TRUE(smsStoreInfo.iTotalEntries > 0, _L("RMobileSmsMessaging::GetMessageStoreInfo returned with incorrect total entries."));
|
|
337 |
ASSERT_EQUALS(smsStoreInfo.iType, RMobilePhoneStore::EShortMessageStore, _L("RMobileSmsMessaging::GetMessageStoreInfo returned with incorrect type."));
|
|
338 |
ASSERT_TRUE(smsStoreInfo.iUsedEntries >= 0, _L("RMobileSmsMessaging::GetMessageStoreInfo returned with incorrect used entries."));
|
|
339 |
|
|
340 |
|
|
341 |
// Check RMobileSmsMessaging::GetMessageStoreInfo with aIndex=1 returns KErrArgument
|
|
342 |
index = 1;
|
|
343 |
TExtEtelRequestStatus smsStoreInfoRequest2(smsMessaging,EMobilePhoneGetPhoneStoreInfo);
|
|
344 |
CleanupStack::PushL(smsStoreInfoRequest2);
|
|
345 |
smsMessaging.GetMessageStoreInfo(smsStoreInfoRequest2, index, smsStorePkg);
|
|
346 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(smsStoreInfoRequest2, ETimeLong),
|
|
347 |
KErrNone, _L("RMobilePhone::GetPhoneStoreInfo timed out."));
|
|
348 |
ASSERT_EQUALS(smsStoreInfoRequest2.Int(), KErrArgument,
|
|
349 |
_L("RMobilePhone::GetPhoneStoreInfo returned with error."));
|
|
350 |
|
|
351 |
//
|
|
352 |
// TEST END
|
|
353 |
//
|
|
354 |
|
|
355 |
StartCleanup();
|
|
356 |
|
|
357 |
// smsStoreInfoRequest
|
|
358 |
// smsStoreInfoRequest2
|
|
359 |
CleanupStack::PopAndDestroy(2, &smsStoreInfoRequest);
|
|
360 |
|
|
361 |
return TestStepResult();
|
|
362 |
}
|
|
363 |
|
|
364 |
TPtrC CCTSYIntegrationTestSmsMessaging0001::GetTestStepName()
|
|
365 |
/**
|
|
366 |
* @return The test step name.
|
|
367 |
*/
|
|
368 |
{
|
|
369 |
return _L("CCTSYIntegrationTestSmsMessaging0001");
|
|
370 |
}
|
|
371 |
|
|
372 |
|
|
373 |
|
|
374 |
CCTSYIntegrationTestSmsMessaging0002::CCTSYIntegrationTestSmsMessaging0002(CEtelSessionMgr& aEtelSessionMgr)
|
|
375 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
376 |
/**
|
|
377 |
* Constructor.
|
|
378 |
*/
|
|
379 |
{
|
|
380 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0002::GetTestStepName());
|
|
381 |
}
|
|
382 |
|
|
383 |
CCTSYIntegrationTestSmsMessaging0002::~CCTSYIntegrationTestSmsMessaging0002()
|
|
384 |
/**
|
|
385 |
* Destructor.
|
|
386 |
*/
|
|
387 |
{
|
|
388 |
}
|
|
389 |
|
|
390 |
TVerdict CCTSYIntegrationTestSmsMessaging0002::doTestStepL()
|
|
391 |
/**
|
|
392 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0002
|
|
393 |
* @SYMFssID BA/CTSY/SMSM-0002
|
|
394 |
* @SYMTestCaseDesc Set the SMS receive mode.
|
|
395 |
* @SYMTestPriority High
|
|
396 |
* @SYMTestActions RMobileSmsMessaging::SetReceiveMode, RMobileSmsMessaging::NotifyReceiveModeChange
|
|
397 |
* @SYMTestExpectedResults Pass - Receive mode is set when the mode is supported. KErrNotSupported is returned otherwise.
|
|
398 |
* @SYMTestType CIT
|
|
399 |
* @SYMTestCaseDependencies live/automatic
|
|
400 |
*
|
|
401 |
* Reason for test: Verify receive mode change notification completes and receive mode is set correctly.
|
|
402 |
*
|
|
403 |
* @return - TVerdict code
|
|
404 |
*
|
|
405 |
* $CTSYKnownFailure - When changing the receive mode AND a notification is requested of its change
|
|
406 |
* (CTSY only supports nofifications when setting the receive mode to EReceiveUnstoredClientAck)
|
|
407 |
* a panic is raised and the board reboots. Adding logging into
|
|
408 |
* the CSY it was found that line 617 of cmmsmstsy.cpp when
|
|
409 |
* It was found that the panic is not caused when this line is executed, but a
|
|
410 |
* little while after.
|
|
411 |
*/
|
|
412 |
{
|
|
413 |
|
|
414 |
//
|
|
415 |
// SET UP
|
|
416 |
//
|
|
417 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
418 |
|
|
419 |
|
|
420 |
//
|
|
421 |
// SET UP END
|
|
422 |
//
|
|
423 |
|
|
424 |
StartTest();
|
|
425 |
|
|
426 |
//
|
|
427 |
// TEST START
|
|
428 |
//
|
|
429 |
|
|
430 |
|
|
431 |
// === Check default receive mode ===
|
|
432 |
|
|
433 |
// Check RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=RMobileSmsMessaging::EReceiveUnstoredClientAck
|
|
434 |
DEBUG_PRINTF1(_L("Checking RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=RMobileSmsMessaging::EReceiveUnstoredClientAck"));
|
|
435 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
436 |
RMobileSmsMessaging::TMobileSmsReceiveMode getReceiveMode;
|
|
437 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
438 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
439 |
ASSERT_EQUALS(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
440 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
441 |
|
|
442 |
|
|
443 |
// === Set receive mode to unsupported modes and check receive mode not changed ==
|
|
444 |
|
|
445 |
// Set receive mode to EReceiveModeUnspecified with RMobileSmsMessaging::SetReceiveMode with aReceiveMode=EReceiveModeUnspecified
|
|
446 |
DEBUG_PRINTF1(_L("Setting receive mode to EReceiveModeUnspecified"));
|
|
447 |
TExtEtelRequestStatus receiveModeRequest(smsMessaging,EMobileSmsMessagingSetReceiveMode);
|
|
448 |
CleanupStack::PushL(receiveModeRequest);
|
|
449 |
receiveMode = RMobileSmsMessaging::EReceiveModeUnspecified;
|
|
450 |
smsMessaging.SetReceiveMode(receiveModeRequest, receiveMode);
|
|
451 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveModeRequest, ETimeMedium),
|
|
452 |
KErrNone, _L("RMobileSmsMessaging::SetReceiveMode timed out."));
|
|
453 |
|
|
454 |
// Check KErrNotSupported is returned
|
|
455 |
ASSERT_EQUALS(receiveModeRequest.Int(), KErrNotSupported,
|
|
456 |
_L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status."));
|
|
457 |
|
|
458 |
// Check RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=EReceiveUnstoredClientAck
|
|
459 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(getReceiveMode), KErrNone,
|
|
460 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
461 |
ASSERT_EQUALS(getReceiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
462 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
463 |
|
|
464 |
|
|
465 |
|
|
466 |
|
|
467 |
|
|
468 |
|
|
469 |
|
|
470 |
// Set receive mode to EReceiveUnstoredPhoneAck with RMobileSmsMessaging::SetReceiveMode with aReceiveMode=EReceiveUnstoredPhoneAck
|
|
471 |
DEBUG_PRINTF1(_L("Setting receive mode to EReceiveUnstoredPhoneAck"));
|
|
472 |
TExtEtelRequestStatus receiveModeRequest2(smsMessaging,EMobileSmsMessagingSetReceiveMode);
|
|
473 |
CleanupStack::PushL(receiveModeRequest2);
|
|
474 |
receiveMode = RMobileSmsMessaging::EReceiveUnstoredPhoneAck;
|
|
475 |
smsMessaging.SetReceiveMode( receiveModeRequest2, receiveMode);
|
|
476 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveModeRequest2, ETimeMedium),
|
|
477 |
KErrNone, _L("RMobileSmsMessaging::SetReceiveMode timed out."));
|
|
478 |
|
|
479 |
// Check KErrNotSupported is returned
|
|
480 |
ASSERT_EQUALS(receiveModeRequest2.Int(), KErrNotSupported,
|
|
481 |
_L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status."));
|
|
482 |
|
|
483 |
// Check RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=EReceiveUnstoredClientAck
|
|
484 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(getReceiveMode), KErrNone,
|
|
485 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
486 |
ASSERT_EQUALS(getReceiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
487 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
488 |
|
|
489 |
|
|
490 |
|
|
491 |
|
|
492 |
|
|
493 |
|
|
494 |
|
|
495 |
// Set receive mode to EReceiveStored with RMobileSmsMessaging::SetReceiveMode with aReceiveMode=EReceiveStored
|
|
496 |
DEBUG_PRINTF1(_L("Setting receive mode to EReceiveStored"));
|
|
497 |
TExtEtelRequestStatus receiveModeRequest3(smsMessaging,EMobileSmsMessagingSetReceiveMode);
|
|
498 |
CleanupStack::PushL(receiveModeRequest3);
|
|
499 |
receiveMode = RMobileSmsMessaging::EReceiveStored;
|
|
500 |
smsMessaging.SetReceiveMode( receiveModeRequest3, receiveMode);
|
|
501 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveModeRequest3, ETimeMedium),
|
|
502 |
KErrNone, _L("RMobileSmsMessaging::SetReceiveMode timed out."));
|
|
503 |
|
|
504 |
// Check KErrNotSupported is returned
|
|
505 |
ASSERT_EQUALS(receiveModeRequest3.Int(), KErrNotSupported,
|
|
506 |
_L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status."));
|
|
507 |
|
|
508 |
// Check RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=EReceiveUnstoredClientAck
|
|
509 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(getReceiveMode), KErrNone,
|
|
510 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
511 |
ASSERT_EQUALS(getReceiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
512 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
513 |
|
|
514 |
|
|
515 |
|
|
516 |
|
|
517 |
|
|
518 |
|
|
519 |
|
|
520 |
// Set receive mode to EReceiveEither with RMobileSmsMessaging::SetReceiveMode with aReceiveMode=EReceiveEither
|
|
521 |
DEBUG_PRINTF1(_L("Setting receive mode to EReceiveEither"));
|
|
522 |
TExtEtelRequestStatus receiveModeRequest4(smsMessaging,EMobileSmsMessagingSetReceiveMode);
|
|
523 |
CleanupStack::PushL(receiveModeRequest4);
|
|
524 |
receiveMode = RMobileSmsMessaging::EReceiveEither;
|
|
525 |
smsMessaging.SetReceiveMode( receiveModeRequest4, receiveMode);
|
|
526 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveModeRequest4, ETimeMedium),
|
|
527 |
KErrNone, _L("RMobileSmsMessaging::SetReceiveMode timed out."));
|
|
528 |
|
|
529 |
// Check KErrNotSupported is returned
|
|
530 |
ASSERT_EQUALS(receiveModeRequest4.Int(), KErrNotSupported,
|
|
531 |
_L("RMobilePhone::GetPhoneStoreInfo completed with incorrect status."));
|
|
532 |
|
|
533 |
// Check RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=EReceiveUnstoredClientAck
|
|
534 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(getReceiveMode),
|
|
535 |
KErrNone, _L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
536 |
ASSERT_EQUALS(getReceiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
537 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
538 |
|
|
539 |
|
|
540 |
|
|
541 |
|
|
542 |
|
|
543 |
|
|
544 |
// === Set receive mode to EReceiveUnstoredClientAck ===
|
|
545 |
|
|
546 |
// === CTSY always completes notification even though the receive mode hasn't changed, we have to assume this is correct behaviour for now. ===
|
|
547 |
DEBUG_PRINTF1(_L("Checking for Notification"));
|
|
548 |
RMobileSmsMessaging::TMobileSmsReceiveMode notifyReceiveMode;
|
|
549 |
TExtEtelRequestStatus notifyRequestStatus(smsMessaging, EMobileSmsMessagingNotifyReceiveModeChange);
|
|
550 |
CleanupStack::PushL(notifyRequestStatus);
|
|
551 |
smsMessaging.NotifyReceiveModeChange(notifyRequestStatus, notifyReceiveMode);
|
|
552 |
|
|
553 |
// Set receive mode to with RMobileSmsMessaging::SetReceiveMode with aReceiveMode=EReceiveUnstoredClientAck
|
|
554 |
DEBUG_PRINTF1(_L("Setting receive mode to EReceiveUnstoredClientAck"));
|
|
555 |
TExtEtelRequestStatus receiveModeRequest5(smsMessaging,EMobileSmsMessagingSetReceiveMode);
|
|
556 |
CleanupStack::PushL(receiveModeRequest5);
|
|
557 |
receiveMode = RMobileSmsMessaging::EReceiveUnstoredClientAck;
|
|
558 |
smsMessaging.SetReceiveMode( receiveModeRequest5, receiveMode);
|
|
559 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveModeRequest5, ETimeMedium),
|
|
560 |
KErrNone, _L("RMobileSmsMessaging::SetReceiveMode timed out."));
|
|
561 |
|
|
562 |
// Check RMobileSmsMessaging::NotifyReceiveModeChange completes wtih aReceiveMode=EReceiveUnstoredClientAck
|
|
563 |
iSmsMessagingTsyTestHelper.WaitForMobileSmsMessagingNotifyReceiveModeChange( smsMessaging,
|
|
564 |
notifyRequestStatus,
|
|
565 |
notifyReceiveMode,
|
|
566 |
RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
567 |
KErrNone );
|
|
568 |
|
|
569 |
// Check RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=EReceiveUnstoredClientAck
|
|
570 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(getReceiveMode), KErrNone,
|
|
571 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
572 |
ASSERT_EQUALS(getReceiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
573 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
574 |
|
|
575 |
|
|
576 |
|
|
577 |
|
|
578 |
|
|
579 |
// === Cancel setting the receive mode ===
|
|
580 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10013);
|
|
581 |
ASSERT_EQUALS(1,0, _L("Test leaving because it will cause TSY crash, remove this when defect is fixed"));
|
|
582 |
TEST_CHECK_POINT_L(_L("test leaving..."));
|
|
583 |
|
|
584 |
// Set receive mode to with RMobileSmsMessaging:: with aReceiveMode=EReceiveUnstoredClientAck
|
|
585 |
DEBUG_PRINTF1(_L("Setting receive mode to EReceiveUnstoredClientAck"));
|
|
586 |
TExtEtelRequestStatus receiveModeRequest6(smsMessaging,EMobileSmsMessagingSetReceiveMode);
|
|
587 |
CleanupStack::PushL(receiveModeRequest6);
|
|
588 |
receiveMode = RMobileSmsMessaging::EReceiveUnstoredClientAck;
|
|
589 |
smsMessaging.SetReceiveMode(receiveModeRequest6, receiveMode);
|
|
590 |
|
|
591 |
|
|
592 |
// Cancel the request with CancelAsyncRequest(EMobileSmsMessagingSetReceiveMode)
|
|
593 |
DEBUG_PRINTF1(_L("Cancel EMobileSmsMessagingSetReceiveMode"));
|
|
594 |
smsMessaging.CancelAsyncRequest(EMobileSmsMessagingSetReceiveMode);
|
|
595 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveModeRequest6, ETimeMedium),
|
|
596 |
KErrNone, _L("RMobileSmsMessaging::SetReceiveMode returned with error."));
|
|
597 |
ASSERT_TRUE(receiveModeRequest6.Int() == KErrNone || receiveModeRequest6.Int() == KErrCancel,
|
|
598 |
_L("RMobileSmsMessaging::SetReceiveMode request completed with error."));
|
|
599 |
|
|
600 |
|
|
601 |
// Check RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=EReceiveUnstoredClientAck
|
|
602 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(getReceiveMode), KErrNone,
|
|
603 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
604 |
ASSERT_EQUALS(getReceiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
605 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
606 |
|
|
607 |
|
|
608 |
//
|
|
609 |
// TEST END
|
|
610 |
//
|
|
611 |
|
|
612 |
StartCleanup();
|
|
613 |
|
|
614 |
//receiveModeRequest
|
|
615 |
//receiveModeRequest2
|
|
616 |
//receiveModeRequest3
|
|
617 |
//receiveModeRequest4
|
|
618 |
//notifyRequestStatus
|
|
619 |
//receiveModeRequest5
|
|
620 |
//receiveModeRequest6
|
|
621 |
CleanupStack::PopAndDestroy(7);
|
|
622 |
|
|
623 |
return TestStepResult();
|
|
624 |
}
|
|
625 |
|
|
626 |
TPtrC CCTSYIntegrationTestSmsMessaging0002::GetTestStepName()
|
|
627 |
/**
|
|
628 |
* @return The test step name.
|
|
629 |
*/
|
|
630 |
{
|
|
631 |
return _L("CCTSYIntegrationTestSmsMessaging0002");
|
|
632 |
}
|
|
633 |
|
|
634 |
|
|
635 |
|
|
636 |
CCTSYIntegrationTestSmsMessaging0003::CCTSYIntegrationTestSmsMessaging0003(CEtelSessionMgr& aEtelSessionMgr)
|
|
637 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
638 |
/**
|
|
639 |
* Constructor.
|
|
640 |
*/
|
|
641 |
{
|
|
642 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0003::GetTestStepName());
|
|
643 |
}
|
|
644 |
|
|
645 |
CCTSYIntegrationTestSmsMessaging0003::~CCTSYIntegrationTestSmsMessaging0003()
|
|
646 |
/**
|
|
647 |
* Destructor.
|
|
648 |
*/
|
|
649 |
{
|
|
650 |
}
|
|
651 |
|
|
652 |
TVerdict CCTSYIntegrationTestSmsMessaging0003::doTestStepL()
|
|
653 |
/**
|
|
654 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0003
|
|
655 |
* @SYMFssID BA/CTSY/SMSM-0003
|
|
656 |
* @SYMTestCaseDesc Send an SMS message in each bearer mode.
|
|
657 |
* @SYMTestPriority High
|
|
658 |
* @SYMTestActions RMobileSmsMessaging::SendMessage, RMobileSmsMessaging::GetMoSmsBearer, RMobileSmsMessaging::NotifyMoSmsBearerChange
|
|
659 |
* @SYMTestExpectedResults Pass - SMS sent successfully using all supported bearers.
|
|
660 |
* @SYMTestType CIT
|
|
661 |
* @SYMTestCaseDependencies live/automatic
|
|
662 |
*
|
|
663 |
* Reason for test: Verify bearer can be set and SMS can be sent.
|
|
664 |
*
|
|
665 |
* @return - TVerdict code
|
|
666 |
*
|
|
667 |
*/
|
|
668 |
{
|
|
669 |
|
|
670 |
//
|
|
671 |
// SET UP
|
|
672 |
//
|
|
673 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
674 |
|
|
675 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
676 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
677 |
|
|
678 |
// Ensure RMobileSmsMessaging::GetMoSmsBearer returns aBearer= ESmsBearerCircuitOnly
|
|
679 |
RMobileSmsMessaging::TMobileSmsBearer bearer = RMobileSmsMessaging::ESmsBearerCircuitOnly;
|
|
680 |
SetSmsBearerL(smsMessaging, bearer);
|
|
681 |
|
|
682 |
|
|
683 |
//
|
|
684 |
// SET UP END
|
|
685 |
//
|
|
686 |
|
|
687 |
StartTest();
|
|
688 |
|
|
689 |
//
|
|
690 |
// TEST START
|
|
691 |
//
|
|
692 |
|
|
693 |
|
|
694 |
// Send an SMS message with RMobileSmsMessaging::SendMessage. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
695 |
TBuf8<140> text(_L8("Hello from CTSY"));
|
|
696 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
697 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
698 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes);
|
|
699 |
|
|
700 |
|
|
701 |
// Send an SMS message with RMobileSmsMessaging::SendMessage. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
702 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
703 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
704 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
705 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
706 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
707 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
708 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
709 |
|
|
710 |
|
|
711 |
//Check no error is returned in aMsgAttributes.iSubmitReport
|
|
712 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
713 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
714 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
715 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
716 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
717 |
|
|
718 |
|
|
719 |
|
|
720 |
|
|
721 |
|
|
722 |
|
|
723 |
// Set the MO SMS bearer to ESmsBearerPacketOnly with RMobileSmsMessaging::SetMoSmsBearer
|
|
724 |
DEBUG_PRINTF1(_L("Set the MO SMS bearer to ESmsBearerPacketOnly"));
|
|
725 |
bearer = RMobileSmsMessaging::ESmsBearerPacketOnly;
|
|
726 |
SetSmsBearerL(smsMessaging, bearer);
|
|
727 |
|
|
728 |
|
|
729 |
//Check the status of the registration
|
|
730 |
DEBUG_PRINTF1(_L("Checking the state of the packet service"));
|
|
731 |
RPacketService &packetService = iEtelSessionMgr.GetPacketServiceL(KMainServer, KMainPhone, KMainPacketService);
|
|
732 |
TExtEtelRequestStatus getNtwkRegStatus(packetService, EPacketGetNtwkRegStatus);
|
|
733 |
CleanupStack::PushL(getNtwkRegStatus);
|
|
734 |
RPacketService::TRegistrationStatus registrationStatus;
|
|
735 |
packetService.GetNtwkRegStatus(getNtwkRegStatus, registrationStatus);
|
|
736 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(getNtwkRegStatus, ETimeMedium),
|
|
737 |
KErrNone, _L("RPacketService::GetNtwkRegStatus timed out."));
|
|
738 |
DEBUG_PRINTF2(_L("NETWORK REGISTRATION STATUS = %d"), registrationStatus);
|
|
739 |
|
|
740 |
//Lets get the status of the packet service
|
|
741 |
TExtEtelRequestStatus statusRequestStatus(packetService, EPacketGetStatus);
|
|
742 |
CleanupStack::PushL(statusRequestStatus);
|
|
743 |
RPacketService::TStatus packetStatus;
|
|
744 |
TInt err=packetService.GetStatus(packetStatus);
|
|
745 |
ASSERT_EQUALS(err, KErrNone, _L("RPacketService::GetStatus returned error."));
|
|
746 |
DEBUG_PRINTF2(_L("Packet status returned %d"), packetStatus);
|
|
747 |
|
|
748 |
// Attach a packet service here:
|
|
749 |
DEBUG_PRINTF1(_L("Set attatch mode to RPacketService::EAttachWhenNeeded"));
|
|
750 |
TExtEtelRequestStatus setAttachModeStatus(packetService, EPacketSetAttachMode);
|
|
751 |
CleanupStack::PushL(setAttachModeStatus);
|
|
752 |
packetService.SetAttachMode(setAttachModeStatus, RPacketService::EAttachWhenNeeded);
|
|
753 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setAttachModeStatus, ETimeLong),
|
|
754 |
KErrNone, _L("RPacketService::SetAttachMode timed-out"));
|
|
755 |
ASSERT_EQUALS(setAttachModeStatus.Int(), KErrNone,
|
|
756 |
_L("RPacketService::SetAttachMode returned with an error"));
|
|
757 |
|
|
758 |
|
|
759 |
//Setup a notifier to be notified of a change in packet service status change
|
|
760 |
TExtEtelRequestStatus notifyStatusChange(packetService, EPacketNotifyStatusChange);
|
|
761 |
CleanupStack::PushL(notifyStatusChange);
|
|
762 |
RPacketService::TStatus notifiedPacketStatus;
|
|
763 |
packetService.NotifyStatusChange(notifyStatusChange, notifiedPacketStatus);
|
|
764 |
|
|
765 |
|
|
766 |
//Attach
|
|
767 |
TExtEtelRequestStatus attachModeStatus(packetService, EPacketSetAttachMode);
|
|
768 |
CleanupStack::PushL(attachModeStatus);
|
|
769 |
packetService.Attach(attachModeStatus);
|
|
770 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(attachModeStatus, ETimeLong),
|
|
771 |
KErrNone, _L("RPacketService::Attach timed-out"));
|
|
772 |
ASSERT_EQUALS(attachModeStatus.Int(), KErrNone,
|
|
773 |
_L("RPacketService::Attach returned with an error"));
|
|
774 |
|
|
775 |
|
|
776 |
// Check RPacketService::NotifyStatusChange() completes wtih aStatus=EStatusAttached
|
|
777 |
RPacketService::TStatus expectedStatus=RPacketService::EStatusAttached;
|
|
778 |
iPacketServiceTsyTestHelper.WaitForPacketServiceNotifyStatusChange(
|
|
779 |
packetService,
|
|
780 |
notifyStatusChange,
|
|
781 |
notifiedPacketStatus,
|
|
782 |
expectedStatus,
|
|
783 |
KErrNone );
|
|
784 |
|
|
785 |
//Send SMS
|
|
786 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes2;
|
|
787 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg2(sendSmsAttributes2);
|
|
788 |
GetSmsSendAttributesL(sendSmsAttributes2);
|
|
789 |
TExtEtelRequestStatus sendSmsRequestStatus2(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
790 |
CleanupStack::PushL(sendSmsRequestStatus2);
|
|
791 |
smsMessaging.SendMessage(sendSmsRequestStatus2, pdu, sendSmsAttributesPckg2);
|
|
792 |
// $CTSYProblem - Sending a SMS message over packetService times out.
|
|
793 |
// - The message is sent from CTSY to LTSY. From the logs it is apparent
|
|
794 |
// - that the message is trying to be sent three times. The sending is
|
|
795 |
// - unsuccessful.
|
|
796 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus2, ETimeMedium),
|
|
797 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
798 |
ASSERT_EQUALS(sendSmsRequestStatus2.Int(), KErrGeneral,
|
|
799 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
800 |
|
|
801 |
// Detach from the packet service
|
|
802 |
TExtEtelRequestStatus detatchPacketStatus(packetService, EPacketContextDeactivate);
|
|
803 |
CleanupStack::PushL(detatchPacketStatus);
|
|
804 |
packetService.Detach(detatchPacketStatus);
|
|
805 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(detatchPacketStatus, ETimeLong),
|
|
806 |
KErrNone, _L("RPacketService::Detach timed-out"));
|
|
807 |
ASSERT_EQUALS(detatchPacketStatus.Int(), KErrNone,
|
|
808 |
_L("RPacketService::Detach returned with an error"));
|
|
809 |
|
|
810 |
|
|
811 |
|
|
812 |
|
|
813 |
// Set the MO SMS bearer to ESmsBearerPacketPreferred with RMobileSmsMessaging::SetMoSmsBearer
|
|
814 |
DEBUG_PRINTF1(_L("Set the MO SMS bearer to ESmsBearerPacketPreferred"));
|
|
815 |
bearer = RMobileSmsMessaging::ESmsBearerPacketPreferred;
|
|
816 |
SetSmsBearerL(smsMessaging, bearer);
|
|
817 |
|
|
818 |
// Send an SMS message with RMobileSmsMessaging::SendMessage. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
819 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes3;
|
|
820 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg3(sendSmsAttributes3);
|
|
821 |
GetSmsSendAttributesL(sendSmsAttributes3);
|
|
822 |
TExtEtelRequestStatus sendSmsRequestStatus3(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
823 |
CleanupStack::PushL(sendSmsRequestStatus3);
|
|
824 |
smsMessaging.SendMessage(sendSmsRequestStatus3, pdu, sendSmsAttributesPckg3);
|
|
825 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus3, ETimeMedium),
|
|
826 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
827 |
ASSERT_EQUALS(sendSmsRequestStatus3.Int(), KErrNone,
|
|
828 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
829 |
|
|
830 |
//Check no error is returned in aMsgAttributes.iSubmitReport
|
|
831 |
ASSERT_TRUE(sendSmsAttributes3.iSubmitReport.Length() > 0,
|
|
832 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
833 |
wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
834 |
ASSERT_BITS_SET(sendSmsAttributes3.iFlags,wantedBits,KNoUnwantedBits,
|
|
835 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
836 |
|
|
837 |
|
|
838 |
|
|
839 |
|
|
840 |
|
|
841 |
|
|
842 |
|
|
843 |
// Set the MO SMS bearer to ESmsBearerCircuitPreferred with RMobileSmsMessaging::SetMoSmsBearer
|
|
844 |
DEBUG_PRINTF1(_L("Set the MO SMS bearer to ESmsBearerCircuitPreferred"));
|
|
845 |
bearer = RMobileSmsMessaging::ESmsBearerCircuitPreferred;
|
|
846 |
SetSmsBearerL(smsMessaging, bearer);
|
|
847 |
|
|
848 |
// Send an SMS message with RMobileSmsMessaging::SendMessage. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
849 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes4;
|
|
850 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg4(sendSmsAttributes4);
|
|
851 |
GetSmsSendAttributesL(sendSmsAttributes4);
|
|
852 |
TExtEtelRequestStatus sendSmsRequestStatus4(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
853 |
CleanupStack::PushL(sendSmsRequestStatus4);
|
|
854 |
smsMessaging.SendMessage(sendSmsRequestStatus4, pdu, sendSmsAttributesPckg4);
|
|
855 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus4, ETimeMedium),
|
|
856 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
857 |
ASSERT_EQUALS(sendSmsRequestStatus4.Int(), KErrNone,
|
|
858 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
859 |
|
|
860 |
//Check no error is returned in aMsgAttributes.iSubmitReport
|
|
861 |
ASSERT_TRUE(sendSmsAttributes4.iSubmitReport.Length() > 0,
|
|
862 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
863 |
wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
864 |
ASSERT_BITS_SET(sendSmsAttributes4.iFlags,wantedBits,KNoUnwantedBits,
|
|
865 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
866 |
|
|
867 |
//
|
|
868 |
// TEST END
|
|
869 |
//
|
|
870 |
|
|
871 |
//StartCleanup();
|
|
872 |
/* sendSmsRequestStatus
|
|
873 |
getNtwkRegStatus
|
|
874 |
statusRequestStatus
|
|
875 |
setAttachModeStatus
|
|
876 |
notifyStatusChange
|
|
877 |
attachModeStatus
|
|
878 |
sendSmsRequestStatus2
|
|
879 |
detatchPacketStatus
|
|
880 |
sendSmsRequestStatus3
|
|
881 |
sendSmsRequestStatus4 */
|
|
882 |
|
|
883 |
CleanupStack::PopAndDestroy(10, &sendSmsRequestStatus);
|
|
884 |
|
|
885 |
return TestStepResult();
|
|
886 |
}
|
|
887 |
|
|
888 |
TPtrC CCTSYIntegrationTestSmsMessaging0003::GetTestStepName()
|
|
889 |
/**
|
|
890 |
* @return The test step name.
|
|
891 |
*/
|
|
892 |
{
|
|
893 |
return _L("CCTSYIntegrationTestSmsMessaging0003");
|
|
894 |
}
|
|
895 |
|
|
896 |
|
|
897 |
|
|
898 |
CCTSYIntegrationTestSmsMessaging0004::CCTSYIntegrationTestSmsMessaging0004(CEtelSessionMgr& aEtelSessionMgr)
|
|
899 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
900 |
/**
|
|
901 |
* Constructor.
|
|
902 |
*/
|
|
903 |
{
|
|
904 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0004::GetTestStepName());
|
|
905 |
}
|
|
906 |
|
|
907 |
CCTSYIntegrationTestSmsMessaging0004::~CCTSYIntegrationTestSmsMessaging0004()
|
|
908 |
/**
|
|
909 |
* Destructor.
|
|
910 |
*/
|
|
911 |
{
|
|
912 |
}
|
|
913 |
|
|
914 |
TVerdict CCTSYIntegrationTestSmsMessaging0004::doTestStepL()
|
|
915 |
/**
|
|
916 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0004
|
|
917 |
* @SYMFssID BA/CTSY/SMSM-0004
|
|
918 |
* @SYMTestCaseDesc Store a valid service centre address and send message using that service centre.
|
|
919 |
* @SYMTestPriority High
|
|
920 |
* @SYMTestActions
|
|
921 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
922 |
* @SYMTestType CIT
|
|
923 |
* @SYMTestCaseDependencies live/automatic
|
|
924 |
*
|
|
925 |
* Reason for test: Verify service centre address stored and message sent successfully.
|
|
926 |
*
|
|
927 |
* @return - TVerdict code
|
|
928 |
*/
|
|
929 |
{
|
|
930 |
|
|
931 |
//
|
|
932 |
// SET UP
|
|
933 |
//
|
|
934 |
|
|
935 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
936 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
937 |
|
|
938 |
//
|
|
939 |
// SET UP END
|
|
940 |
//
|
|
941 |
|
|
942 |
StartTest();
|
|
943 |
|
|
944 |
//
|
|
945 |
// TEST START
|
|
946 |
//
|
|
947 |
|
|
948 |
|
|
949 |
// Send an SMS message using RMobileSmsMessaging::SendMessage with a valid service centre number in TMobileSmsAttributesV1::iGsmServiceCentre (ensure TMobileSmsAttributeFlags is set correctly). Check no error is returned in aMsgAttributes.iSubmitReport
|
|
950 |
|
|
951 |
|
|
952 |
//
|
|
953 |
// TEST END
|
|
954 |
//
|
|
955 |
|
|
956 |
StartCleanup();
|
|
957 |
|
|
958 |
// Put any required test clean up here, then remove this comment
|
|
959 |
|
|
960 |
return TestStepResult();
|
|
961 |
}
|
|
962 |
|
|
963 |
TPtrC CCTSYIntegrationTestSmsMessaging0004::GetTestStepName()
|
|
964 |
/**
|
|
965 |
* @return The test step name.
|
|
966 |
*/
|
|
967 |
{
|
|
968 |
return _L("CCTSYIntegrationTestSmsMessaging0004");
|
|
969 |
}
|
|
970 |
|
|
971 |
|
|
972 |
|
|
973 |
CCTSYIntegrationTestSmsMessaging0005::CCTSYIntegrationTestSmsMessaging0005(CEtelSessionMgr& aEtelSessionMgr)
|
|
974 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
975 |
/**
|
|
976 |
* Constructor.
|
|
977 |
*/
|
|
978 |
{
|
|
979 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0005::GetTestStepName());
|
|
980 |
}
|
|
981 |
|
|
982 |
CCTSYIntegrationTestSmsMessaging0005::~CCTSYIntegrationTestSmsMessaging0005()
|
|
983 |
/**
|
|
984 |
* Destructor.
|
|
985 |
*/
|
|
986 |
{
|
|
987 |
}
|
|
988 |
|
|
989 |
TVerdict CCTSYIntegrationTestSmsMessaging0005::doTestStepL()
|
|
990 |
/**
|
|
991 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0005
|
|
992 |
* @SYMFssID BA/CTSY/SMSM-0005
|
|
993 |
* @SYMTestCaseDesc Send message with different validity periods
|
|
994 |
* @SYMTestPriority High
|
|
995 |
* @SYMTestActions RMobileSmsMessaging::StoreSmspListL
|
|
996 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
997 |
* @SYMTestType CIT
|
|
998 |
* @SYMTestCaseDependencies live/automatic
|
|
999 |
*
|
|
1000 |
* Reason for test: Verify message sent.
|
|
1001 |
*
|
|
1002 |
* @return - TVerdict code
|
|
1003 |
*/
|
|
1004 |
{
|
|
1005 |
|
|
1006 |
//
|
|
1007 |
// SET UP
|
|
1008 |
//
|
|
1009 |
|
|
1010 |
|
|
1011 |
|
|
1012 |
//
|
|
1013 |
// SET UP END
|
|
1014 |
//
|
|
1015 |
|
|
1016 |
StartTest();
|
|
1017 |
|
|
1018 |
//
|
|
1019 |
// TEST START
|
|
1020 |
//
|
|
1021 |
|
|
1022 |
|
|
1023 |
// Store SMS parameters with RMobileSmsMessaging::StoreSmspListL with one entry with TMobileSmspEntryV1::iValidityPeriod of 1 day
|
|
1024 |
|
|
1025 |
// Send an SMS message with RMobileSmsMessaging::SendMessage. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1026 |
|
|
1027 |
// Store SMS parameters with RMobileSmsMessaging::StoreSmspListL with one entry with TMobileSmspEntryV1::iValidityPeriod of 3 days
|
|
1028 |
|
|
1029 |
// Send an SMS message with RMobileSmsMessaging::SendMessage. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1030 |
|
|
1031 |
|
|
1032 |
//
|
|
1033 |
// TEST END
|
|
1034 |
//
|
|
1035 |
|
|
1036 |
StartCleanup();
|
|
1037 |
|
|
1038 |
// Put any required test clean up here, then remove this comment
|
|
1039 |
|
|
1040 |
return TestStepResult();
|
|
1041 |
}
|
|
1042 |
|
|
1043 |
TPtrC CCTSYIntegrationTestSmsMessaging0005::GetTestStepName()
|
|
1044 |
/**
|
|
1045 |
* @return The test step name.
|
|
1046 |
*/
|
|
1047 |
{
|
|
1048 |
return _L("CCTSYIntegrationTestSmsMessaging0005");
|
|
1049 |
}
|
|
1050 |
|
|
1051 |
|
|
1052 |
|
|
1053 |
CCTSYIntegrationTestSmsMessaging0006::CCTSYIntegrationTestSmsMessaging0006(CEtelSessionMgr& aEtelSessionMgr)
|
|
1054 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1055 |
/**
|
|
1056 |
* Constructor.
|
|
1057 |
*/
|
|
1058 |
{
|
|
1059 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0006::GetTestStepName());
|
|
1060 |
}
|
|
1061 |
|
|
1062 |
CCTSYIntegrationTestSmsMessaging0006::~CCTSYIntegrationTestSmsMessaging0006()
|
|
1063 |
/**
|
|
1064 |
* Destructor.
|
|
1065 |
*/
|
|
1066 |
{
|
|
1067 |
}
|
|
1068 |
|
|
1069 |
TVerdict CCTSYIntegrationTestSmsMessaging0006::doTestStepL()
|
|
1070 |
/**
|
|
1071 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0006
|
|
1072 |
* @SYMFssID BA/CTSY/SMSM-0006
|
|
1073 |
* @SYMTestCaseDesc Send SMS with request for status report.
|
|
1074 |
* @SYMTestPriority High
|
|
1075 |
* @SYMTestActions
|
|
1076 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1077 |
* @SYMTestType CIT
|
|
1078 |
* @SYMTestCaseDependencies live/automatic
|
|
1079 |
*
|
|
1080 |
* Reason for test: Verify message sent.
|
|
1081 |
*
|
|
1082 |
* @return - TVerdict code
|
|
1083 |
*/
|
|
1084 |
{
|
|
1085 |
|
|
1086 |
//
|
|
1087 |
// SET UP
|
|
1088 |
//
|
|
1089 |
|
|
1090 |
// wait until we are on the network
|
|
1091 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1092 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1093 |
|
|
1094 |
//
|
|
1095 |
// SET UP END
|
|
1096 |
//
|
|
1097 |
|
|
1098 |
StartTest();
|
|
1099 |
|
|
1100 |
//
|
|
1101 |
// TEST START
|
|
1102 |
//
|
|
1103 |
|
|
1104 |
|
|
1105 |
// Send an SMS message containing also a request for a status report with RMobileSmsMessaging::SendMessage.
|
|
1106 |
TBuf8<140> text(_L8("BA-CTSY-INT-SMSM-0006"));
|
|
1107 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
1108 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
1109 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,
|
|
1110 |
TSmsStoreTsyTestHelper::ENoDataCodingScheme, EFalse, ETrue);
|
|
1111 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
1112 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
1113 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
1114 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
1115 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
1116 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
1117 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
1118 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
1119 |
|
|
1120 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1121 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
1122 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
1123 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
1124 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
1125 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
1126 |
|
|
1127 |
|
|
1128 |
//
|
|
1129 |
// TEST END
|
|
1130 |
//
|
|
1131 |
|
|
1132 |
StartCleanup();
|
|
1133 |
|
|
1134 |
// Pop:
|
|
1135 |
// sendSmsRequestStatus
|
|
1136 |
CleanupStack::PopAndDestroy(&sendSmsRequestStatus);
|
|
1137 |
|
|
1138 |
return TestStepResult();
|
|
1139 |
}
|
|
1140 |
|
|
1141 |
TPtrC CCTSYIntegrationTestSmsMessaging0006::GetTestStepName()
|
|
1142 |
/**
|
|
1143 |
* @return The test step name.
|
|
1144 |
*/
|
|
1145 |
{
|
|
1146 |
return _L("CCTSYIntegrationTestSmsMessaging0006");
|
|
1147 |
}
|
|
1148 |
|
|
1149 |
|
|
1150 |
|
|
1151 |
CCTSYIntegrationTestSmsMessaging0007::CCTSYIntegrationTestSmsMessaging0007(CEtelSessionMgr& aEtelSessionMgr)
|
|
1152 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1153 |
/**
|
|
1154 |
* Constructor.
|
|
1155 |
*/
|
|
1156 |
{
|
|
1157 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0007::GetTestStepName());
|
|
1158 |
}
|
|
1159 |
|
|
1160 |
CCTSYIntegrationTestSmsMessaging0007::~CCTSYIntegrationTestSmsMessaging0007()
|
|
1161 |
/**
|
|
1162 |
* Destructor.
|
|
1163 |
*/
|
|
1164 |
{
|
|
1165 |
}
|
|
1166 |
|
|
1167 |
TVerdict CCTSYIntegrationTestSmsMessaging0007::doTestStepL()
|
|
1168 |
/**
|
|
1169 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0007
|
|
1170 |
* @SYMFssID BA/CTSY/SMSM-0007
|
|
1171 |
* @SYMTestCaseDesc Send an empty SMS message.
|
|
1172 |
* @SYMTestPriority High
|
|
1173 |
* @SYMTestActions
|
|
1174 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1175 |
* @SYMTestType CIT
|
|
1176 |
* @SYMTestCaseDependencies live/automatic
|
|
1177 |
*
|
|
1178 |
* Reason for test: Verify message sent.
|
|
1179 |
*
|
|
1180 |
* @return - TVerdict code
|
|
1181 |
*/
|
|
1182 |
{
|
|
1183 |
|
|
1184 |
//
|
|
1185 |
// SET UP
|
|
1186 |
//
|
|
1187 |
|
|
1188 |
// wait until we are on the network
|
|
1189 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1190 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1191 |
|
|
1192 |
|
|
1193 |
//
|
|
1194 |
// SET UP END
|
|
1195 |
//
|
|
1196 |
|
|
1197 |
StartTest();
|
|
1198 |
|
|
1199 |
//
|
|
1200 |
// TEST START
|
|
1201 |
//
|
|
1202 |
|
|
1203 |
|
|
1204 |
// Send an empty SMS message with RMobileSmsMessaging::SendMessage.
|
|
1205 |
TBuf8<140> text(_L8(""));
|
|
1206 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
1207 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
1208 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes);
|
|
1209 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
1210 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
1211 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
1212 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
1213 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
1214 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
1215 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
1216 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
1217 |
|
|
1218 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1219 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
1220 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
1221 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
1222 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
1223 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
1224 |
|
|
1225 |
|
|
1226 |
//
|
|
1227 |
// TEST END
|
|
1228 |
//
|
|
1229 |
|
|
1230 |
StartCleanup();
|
|
1231 |
|
|
1232 |
// Pop:
|
|
1233 |
// sendSmsRequestStatus
|
|
1234 |
CleanupStack::PopAndDestroy(&sendSmsRequestStatus);
|
|
1235 |
|
|
1236 |
return TestStepResult();
|
|
1237 |
}
|
|
1238 |
|
|
1239 |
TPtrC CCTSYIntegrationTestSmsMessaging0007::GetTestStepName()
|
|
1240 |
/**
|
|
1241 |
* @return The test step name.
|
|
1242 |
*/
|
|
1243 |
{
|
|
1244 |
return _L("CCTSYIntegrationTestSmsMessaging0007");
|
|
1245 |
}
|
|
1246 |
|
|
1247 |
|
|
1248 |
|
|
1249 |
CCTSYIntegrationTestSmsMessaging0008::CCTSYIntegrationTestSmsMessaging0008(CEtelSessionMgr& aEtelSessionMgr)
|
|
1250 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1251 |
/**
|
|
1252 |
* Constructor.
|
|
1253 |
*/
|
|
1254 |
{
|
|
1255 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0008::GetTestStepName());
|
|
1256 |
}
|
|
1257 |
|
|
1258 |
CCTSYIntegrationTestSmsMessaging0008::~CCTSYIntegrationTestSmsMessaging0008()
|
|
1259 |
/**
|
|
1260 |
* Destructor.
|
|
1261 |
*/
|
|
1262 |
{
|
|
1263 |
}
|
|
1264 |
|
|
1265 |
TVerdict CCTSYIntegrationTestSmsMessaging0008::doTestStepL()
|
|
1266 |
/**
|
|
1267 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0008
|
|
1268 |
* @SYMFssID BA/CTSY/SMSM-0008
|
|
1269 |
* @SYMTestCaseDesc Send a 160 character SMS when using MMI language of Default 7-bit alphabet
|
|
1270 |
* @SYMTestPriority High
|
|
1271 |
* @SYMTestActions RMobileSmsMessaging::SetMoSmsBearer
|
|
1272 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1273 |
* @SYMTestType CIT
|
|
1274 |
* @SYMTestCaseDependencies live/automatic
|
|
1275 |
*
|
|
1276 |
* Reason for test: Verify message sent.
|
|
1277 |
*
|
|
1278 |
* @return - TVerdict code
|
|
1279 |
*
|
|
1280 |
* $CTSYProblem - There is nothing wrong with the procedure: I used a notifer to for
|
|
1281 |
* a change in the bearer mode. The notifier is not supported in CTSY: CTSY returns
|
|
1282 |
* KErrNotSupported for CMmSmsTsy::NotifyMoSmsBearerChange
|
|
1283 |
*/
|
|
1284 |
{
|
|
1285 |
|
|
1286 |
//
|
|
1287 |
// SET UP
|
|
1288 |
//
|
|
1289 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
1290 |
|
|
1291 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1292 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1293 |
|
|
1294 |
//
|
|
1295 |
// SET UP END
|
|
1296 |
//
|
|
1297 |
|
|
1298 |
StartTest();
|
|
1299 |
|
|
1300 |
//
|
|
1301 |
// TEST START
|
|
1302 |
//
|
|
1303 |
|
|
1304 |
|
|
1305 |
// Send a 160 character SMS message with RMobileSmsMessaging::SendMessage encoded using default 7bit alphabet. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1306 |
TBuf8<160> text(_L8("Hello Mobile. This is a 160 Character message. It is going to fill up the entire length of of a PDU. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"));
|
|
1307 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
1308 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
1309 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes);
|
|
1310 |
|
|
1311 |
//Send the PDU
|
|
1312 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
1313 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
1314 |
|
|
1315 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
1316 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
1317 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
1318 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
1319 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
1320 |
|
|
1321 |
//Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1322 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
1323 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
1324 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
1325 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
1326 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
1327 |
|
|
1328 |
|
|
1329 |
|
|
1330 |
|
|
1331 |
// === Send another SMS immediately after ===
|
|
1332 |
|
|
1333 |
// Send a 160 character SMS message with RMobileSmsMessaging::SendMessage encoded using default 7bit alphabet. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1334 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes2;
|
|
1335 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg2(sendSmsAttributes2);
|
|
1336 |
GetSmsSendAttributesL(sendSmsAttributes2);
|
|
1337 |
TExtEtelRequestStatus sendSmsRequestStatus2(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
1338 |
CleanupStack::PushL(sendSmsRequestStatus2);
|
|
1339 |
sendSmsAttributes.iSubmitReport.SetLength(0);
|
|
1340 |
smsMessaging.SendMessage(sendSmsRequestStatus2, pdu, sendSmsAttributesPckg2);
|
|
1341 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus2, ETimeMedium),
|
|
1342 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
1343 |
ASSERT_EQUALS(sendSmsRequestStatus2.Int(), KErrNone,
|
|
1344 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
1345 |
|
|
1346 |
//Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1347 |
ASSERT_TRUE(sendSmsAttributes2.iSubmitReport.Length() > 0,
|
|
1348 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
1349 |
ASSERT_BITS_SET(sendSmsAttributes2.iFlags,wantedBits,KNoUnwantedBits,
|
|
1350 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
1351 |
|
|
1352 |
|
|
1353 |
// === Send an SMS to an international number ===
|
|
1354 |
|
|
1355 |
// Send a 160 character SMS message with RMobileSmsMessaging::SendMessage encoded using default 7bit alphabet to an international number. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1356 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes3;
|
|
1357 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg3(sendSmsAttributes3);
|
|
1358 |
GetSmsSendAttributesL(sendSmsAttributes3);
|
|
1359 |
sendSmsAttributes3.iDestination.iTypeOfNumber=RMobilePhone::EInternationalNumber;
|
|
1360 |
TExtEtelRequestStatus sendSmsRequestStatus3(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
1361 |
CleanupStack::PushL(sendSmsRequestStatus3);
|
|
1362 |
sendSmsAttributes.iSubmitReport.SetLength(0);
|
|
1363 |
smsMessaging.SendMessage(sendSmsRequestStatus3, pdu, sendSmsAttributesPckg3);
|
|
1364 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus3, ETimeMedium),
|
|
1365 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
1366 |
ASSERT_EQUALS(sendSmsRequestStatus3.Int(), KErrNone,
|
|
1367 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
1368 |
|
|
1369 |
//Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1370 |
ASSERT_TRUE(sendSmsAttributes3.iSubmitReport.Length() > 0,
|
|
1371 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
1372 |
ASSERT_BITS_SET(sendSmsAttributes3.iFlags,wantedBits,KNoUnwantedBits,
|
|
1373 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
1374 |
|
|
1375 |
|
|
1376 |
|
|
1377 |
// === Cancel sending an SMS message ===
|
|
1378 |
|
|
1379 |
// Set the bearer to RMobileSmsMessaging::ESmsBearerCircuitPreferred with RMobileSmsMessaging::SetMoSmsBearer
|
|
1380 |
RMobileSmsMessaging::TMobileSmsBearer bearer;
|
|
1381 |
TExtEtelRequestStatus notifyBearerChangeStatus(smsMessaging, EMobileSmsMessagingNotifyMoSmsBearerChange);
|
|
1382 |
CleanupStack::PushL(notifyBearerChangeStatus);
|
|
1383 |
smsMessaging.NotifyMoSmsBearerChange(notifyBearerChangeStatus, bearer);
|
|
1384 |
|
|
1385 |
TExtEtelRequestStatus setBearerStatus(smsMessaging, EMobileSmsMessagingSetMoSmsBearer);
|
|
1386 |
CleanupStack::PushL(setBearerStatus);
|
|
1387 |
smsMessaging.SetMoSmsBearer(setBearerStatus, RMobileSmsMessaging::ESmsBearerCircuitPreferred);
|
|
1388 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(setBearerStatus, ETimeLong), KErrNone,
|
|
1389 |
_L("RMobileSmsMessaging::SetMoSmsBearer timed-out"));
|
|
1390 |
|
|
1391 |
// Check RMobileSmsMessaging::NotifyMoSmsBearerChange completes with KErrNotSupported
|
|
1392 |
bearer = RMobileSmsMessaging::ESmsBearerCircuitPreferred;
|
|
1393 |
iSmsMessagingTsyTestHelper.WaitForMobileSmsMessagingNotifyMoSmsBearerChange(smsMessaging,
|
|
1394 |
notifyBearerChangeStatus, bearer, RMobileSmsMessaging::ESmsBearerCircuitPreferred, KErrNotSupported);
|
|
1395 |
|
|
1396 |
|
|
1397 |
|
|
1398 |
// Send an SMS message with RMobileSmsMessaging::SendMessage
|
|
1399 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes4;
|
|
1400 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg4(sendSmsAttributes4);
|
|
1401 |
GetSmsSendAttributesL(sendSmsAttributes4);
|
|
1402 |
TExtEtelRequestStatus sendSmsRequestStatus4(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
1403 |
CleanupStack::PushL(sendSmsRequestStatus4);
|
|
1404 |
sendSmsAttributes.iSubmitReport.SetLength(0);
|
|
1405 |
smsMessaging.SendMessage(sendSmsRequestStatus4, pdu, sendSmsAttributesPckg4);
|
|
1406 |
|
|
1407 |
|
|
1408 |
// Cancel the request immediately with CancelAsyncRequest(EMobileSmsMessagingSendMessage)
|
|
1409 |
smsMessaging.CancelAsyncRequest(EMobileSmsMessagingSendMessage);
|
|
1410 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus4, ETimeMedium), KErrNone,
|
|
1411 |
_L("RMobileSmsMessaging::SendMessage timed-out"));
|
|
1412 |
|
|
1413 |
|
|
1414 |
// Check RMobileSmsMessaging::SendMessage completed with KErrCancel or KErrNone
|
|
1415 |
ASSERT_TRUE(sendSmsRequestStatus4.Int() == KErrNone || sendSmsRequestStatus4.Int() == KErrCancel,
|
|
1416 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
1417 |
|
|
1418 |
|
|
1419 |
//
|
|
1420 |
// TEST END
|
|
1421 |
//
|
|
1422 |
|
|
1423 |
StartCleanup();
|
|
1424 |
|
|
1425 |
// sendSmsRequestStatus
|
|
1426 |
// sendSmsRequestStatus2
|
|
1427 |
// sendSmsRequestStatus3
|
|
1428 |
// notifyBearerChangeStatus
|
|
1429 |
// setBearerStatus
|
|
1430 |
// sendSmsRequestStatus4
|
|
1431 |
|
|
1432 |
CleanupStack::PopAndDestroy(6);
|
|
1433 |
|
|
1434 |
return TestStepResult();
|
|
1435 |
}
|
|
1436 |
|
|
1437 |
TPtrC CCTSYIntegrationTestSmsMessaging0008::GetTestStepName()
|
|
1438 |
/**
|
|
1439 |
* @return The test step name.
|
|
1440 |
*/
|
|
1441 |
{
|
|
1442 |
return _L("CCTSYIntegrationTestSmsMessaging0008");
|
|
1443 |
}
|
|
1444 |
|
|
1445 |
|
|
1446 |
|
|
1447 |
CCTSYIntegrationTestSmsMessaging0009::CCTSYIntegrationTestSmsMessaging0009(CEtelSessionMgr& aEtelSessionMgr)
|
|
1448 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1449 |
/**
|
|
1450 |
* Constructor.
|
|
1451 |
*/
|
|
1452 |
{
|
|
1453 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0009::GetTestStepName());
|
|
1454 |
}
|
|
1455 |
|
|
1456 |
CCTSYIntegrationTestSmsMessaging0009::~CCTSYIntegrationTestSmsMessaging0009()
|
|
1457 |
/**
|
|
1458 |
* Destructor.
|
|
1459 |
*/
|
|
1460 |
{
|
|
1461 |
}
|
|
1462 |
|
|
1463 |
TVerdict CCTSYIntegrationTestSmsMessaging0009::doTestStepL()
|
|
1464 |
/**
|
|
1465 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0009
|
|
1466 |
* @SYMFssID BA/CTSY/SMSM-0009
|
|
1467 |
* @SYMTestCaseDesc Send a 160 character SMS when using MMI language of UCS2 alphabet & message content is default 7-bit alphabet
|
|
1468 |
* @SYMTestPriority High
|
|
1469 |
* @SYMTestActions
|
|
1470 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1471 |
* @SYMTestType CIT
|
|
1472 |
* @SYMTestCaseDependencies live/automatic
|
|
1473 |
*
|
|
1474 |
* Reason for test: Verify message sent.
|
|
1475 |
*
|
|
1476 |
* @return - TVerdict code
|
|
1477 |
*/
|
|
1478 |
{
|
|
1479 |
|
|
1480 |
//
|
|
1481 |
// SET UP
|
|
1482 |
//
|
|
1483 |
|
|
1484 |
|
|
1485 |
|
|
1486 |
//
|
|
1487 |
// SET UP END
|
|
1488 |
//
|
|
1489 |
|
|
1490 |
StartTest();
|
|
1491 |
|
|
1492 |
//
|
|
1493 |
// TEST START
|
|
1494 |
//
|
|
1495 |
|
|
1496 |
|
|
1497 |
// Send a 160 character SMS message with RMobileSmsMessaging::SendMessage encoded using MMI language of UCS2 alphabet & message content is default 7-bit alphabet. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1498 |
|
|
1499 |
|
|
1500 |
//
|
|
1501 |
// TEST END
|
|
1502 |
//
|
|
1503 |
|
|
1504 |
StartCleanup();
|
|
1505 |
|
|
1506 |
// Put any required test clean up here, then remove this comment
|
|
1507 |
|
|
1508 |
return TestStepResult();
|
|
1509 |
}
|
|
1510 |
|
|
1511 |
TPtrC CCTSYIntegrationTestSmsMessaging0009::GetTestStepName()
|
|
1512 |
/**
|
|
1513 |
* @return The test step name.
|
|
1514 |
*/
|
|
1515 |
{
|
|
1516 |
return _L("CCTSYIntegrationTestSmsMessaging0009");
|
|
1517 |
}
|
|
1518 |
|
|
1519 |
|
|
1520 |
|
|
1521 |
CCTSYIntegrationTestSmsMessaging0010::CCTSYIntegrationTestSmsMessaging0010(CEtelSessionMgr& aEtelSessionMgr)
|
|
1522 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1523 |
/**
|
|
1524 |
* Constructor.
|
|
1525 |
*/
|
|
1526 |
{
|
|
1527 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0010::GetTestStepName());
|
|
1528 |
}
|
|
1529 |
|
|
1530 |
CCTSYIntegrationTestSmsMessaging0010::~CCTSYIntegrationTestSmsMessaging0010()
|
|
1531 |
/**
|
|
1532 |
* Destructor.
|
|
1533 |
*/
|
|
1534 |
{
|
|
1535 |
}
|
|
1536 |
|
|
1537 |
TVerdict CCTSYIntegrationTestSmsMessaging0010::doTestStepL()
|
|
1538 |
/**
|
|
1539 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0010
|
|
1540 |
* @SYMFssID BA/CTSY/SMSM-0010
|
|
1541 |
* @SYMTestCaseDesc Send an SMS of length greater than 160 characters encoded with default 7-bit alphabet
|
|
1542 |
* @SYMTestPriority High
|
|
1543 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
1544 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1545 |
* @SYMTestType CIT
|
|
1546 |
* @SYMTestCaseDependencies live/automatic
|
|
1547 |
*
|
|
1548 |
* Reason for test: Verify message sent.
|
|
1549 |
*
|
|
1550 |
* @return - TVerdict code
|
|
1551 |
*/
|
|
1552 |
{
|
|
1553 |
|
|
1554 |
//
|
|
1555 |
// SET UP
|
|
1556 |
//
|
|
1557 |
|
|
1558 |
|
|
1559 |
|
|
1560 |
//
|
|
1561 |
// SET UP END
|
|
1562 |
//
|
|
1563 |
|
|
1564 |
StartTest();
|
|
1565 |
|
|
1566 |
//
|
|
1567 |
// TEST START
|
|
1568 |
//
|
|
1569 |
|
|
1570 |
|
|
1571 |
// Send a 220 character SMS message with RMobileSmsMessaging::SendMessage encoded using default 7bit alphabet to the board. Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1572 |
|
|
1573 |
// Check the full message is received with RMobileSmsMessaging::ReceiveMessage
|
|
1574 |
|
|
1575 |
|
|
1576 |
//
|
|
1577 |
// TEST END
|
|
1578 |
//
|
|
1579 |
|
|
1580 |
StartCleanup();
|
|
1581 |
|
|
1582 |
// Put any required test clean up here, then remove this comment
|
|
1583 |
|
|
1584 |
return TestStepResult();
|
|
1585 |
}
|
|
1586 |
|
|
1587 |
TPtrC CCTSYIntegrationTestSmsMessaging0010::GetTestStepName()
|
|
1588 |
/**
|
|
1589 |
* @return The test step name.
|
|
1590 |
*/
|
|
1591 |
{
|
|
1592 |
return _L("CCTSYIntegrationTestSmsMessaging0010");
|
|
1593 |
}
|
|
1594 |
|
|
1595 |
|
|
1596 |
|
|
1597 |
CCTSYIntegrationTestSmsMessaging0011::CCTSYIntegrationTestSmsMessaging0011(CEtelSessionMgr& aEtelSessionMgr)
|
|
1598 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1599 |
/**
|
|
1600 |
* Constructor.
|
|
1601 |
*/
|
|
1602 |
{
|
|
1603 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0011::GetTestStepName());
|
|
1604 |
}
|
|
1605 |
|
|
1606 |
CCTSYIntegrationTestSmsMessaging0011::~CCTSYIntegrationTestSmsMessaging0011()
|
|
1607 |
/**
|
|
1608 |
* Destructor.
|
|
1609 |
*/
|
|
1610 |
{
|
|
1611 |
}
|
|
1612 |
|
|
1613 |
TVerdict CCTSYIntegrationTestSmsMessaging0011::doTestStepL()
|
|
1614 |
/**
|
|
1615 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0011
|
|
1616 |
* @SYMFssID BA/CTSY/SMSM-0011
|
|
1617 |
* @SYMTestCaseDesc Send an SMS encoded with 7-bit alphabet which is over 140 Bytes
|
|
1618 |
* @SYMTestPriority High
|
|
1619 |
* @SYMTestActions
|
|
1620 |
* @SYMTestExpectedResults Pass - SMS sent successfully
|
|
1621 |
* @SYMTestType CIT
|
|
1622 |
* @SYMTestCaseDependencies live/automatic
|
|
1623 |
*
|
|
1624 |
* Reason for test: Verify message sent.
|
|
1625 |
*
|
|
1626 |
* @return - TVerdict code
|
|
1627 |
*/
|
|
1628 |
{
|
|
1629 |
|
|
1630 |
//
|
|
1631 |
// SET UP
|
|
1632 |
//
|
|
1633 |
|
|
1634 |
|
|
1635 |
|
|
1636 |
//
|
|
1637 |
// SET UP END
|
|
1638 |
//
|
|
1639 |
|
|
1640 |
StartTest();
|
|
1641 |
|
|
1642 |
//
|
|
1643 |
// TEST START
|
|
1644 |
//
|
|
1645 |
|
|
1646 |
|
|
1647 |
// Send an SMS message that contains over 140 bytes of content encoded with the default 7 bit alphabet with RMobileSmsMessaging::SendMessage
|
|
1648 |
|
|
1649 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1650 |
|
|
1651 |
|
|
1652 |
//
|
|
1653 |
// TEST END
|
|
1654 |
//
|
|
1655 |
|
|
1656 |
StartCleanup();
|
|
1657 |
|
|
1658 |
// Put any required test clean up here, then remove this comment
|
|
1659 |
|
|
1660 |
return TestStepResult();
|
|
1661 |
}
|
|
1662 |
|
|
1663 |
TPtrC CCTSYIntegrationTestSmsMessaging0011::GetTestStepName()
|
|
1664 |
/**
|
|
1665 |
* @return The test step name.
|
|
1666 |
*/
|
|
1667 |
{
|
|
1668 |
return _L("CCTSYIntegrationTestSmsMessaging0011");
|
|
1669 |
}
|
|
1670 |
|
|
1671 |
|
|
1672 |
|
|
1673 |
CCTSYIntegrationTestSmsMessaging0012::CCTSYIntegrationTestSmsMessaging0012(CEtelSessionMgr& aEtelSessionMgr)
|
|
1674 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1675 |
/**
|
|
1676 |
* Constructor.
|
|
1677 |
*/
|
|
1678 |
{
|
|
1679 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0012::GetTestStepName());
|
|
1680 |
}
|
|
1681 |
|
|
1682 |
CCTSYIntegrationTestSmsMessaging0012::~CCTSYIntegrationTestSmsMessaging0012()
|
|
1683 |
/**
|
|
1684 |
* Destructor.
|
|
1685 |
*/
|
|
1686 |
{
|
|
1687 |
}
|
|
1688 |
|
|
1689 |
TVerdict CCTSYIntegrationTestSmsMessaging0012::doTestStepL()
|
|
1690 |
/**
|
|
1691 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0012
|
|
1692 |
* @SYMFssID BA/CTSY/SMSM-0012
|
|
1693 |
* @SYMTestCaseDesc Send an SMS over 70 characters in length encoded with UCS-2 alphabet
|
|
1694 |
* @SYMTestPriority High
|
|
1695 |
* @SYMTestActions
|
|
1696 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1697 |
* @SYMTestType CIT
|
|
1698 |
* @SYMTestCaseDependencies live/automatic
|
|
1699 |
*
|
|
1700 |
* Reason for test: Verify message sent.
|
|
1701 |
*
|
|
1702 |
* @return - TVerdict code
|
|
1703 |
*/
|
|
1704 |
{
|
|
1705 |
|
|
1706 |
//
|
|
1707 |
// SET UP
|
|
1708 |
//
|
|
1709 |
|
|
1710 |
|
|
1711 |
|
|
1712 |
//
|
|
1713 |
// SET UP END
|
|
1714 |
//
|
|
1715 |
|
|
1716 |
StartTest();
|
|
1717 |
|
|
1718 |
//
|
|
1719 |
// TEST START
|
|
1720 |
//
|
|
1721 |
|
|
1722 |
|
|
1723 |
// Send an SMS over 70 characters in length encoded with UCS-2 alphabet with RMobileSmsMessaging::SendMessage
|
|
1724 |
|
|
1725 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1726 |
|
|
1727 |
|
|
1728 |
//
|
|
1729 |
// TEST END
|
|
1730 |
//
|
|
1731 |
|
|
1732 |
StartCleanup();
|
|
1733 |
|
|
1734 |
// Put any required test clean up here, then remove this comment
|
|
1735 |
|
|
1736 |
return TestStepResult();
|
|
1737 |
}
|
|
1738 |
|
|
1739 |
TPtrC CCTSYIntegrationTestSmsMessaging0012::GetTestStepName()
|
|
1740 |
/**
|
|
1741 |
* @return The test step name.
|
|
1742 |
*/
|
|
1743 |
{
|
|
1744 |
return _L("CCTSYIntegrationTestSmsMessaging0012");
|
|
1745 |
}
|
|
1746 |
|
|
1747 |
|
|
1748 |
|
|
1749 |
CCTSYIntegrationTestSmsMessaging0013::CCTSYIntegrationTestSmsMessaging0013(CEtelSessionMgr& aEtelSessionMgr)
|
|
1750 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1751 |
/**
|
|
1752 |
* Constructor.
|
|
1753 |
*/
|
|
1754 |
{
|
|
1755 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0013::GetTestStepName());
|
|
1756 |
}
|
|
1757 |
|
|
1758 |
CCTSYIntegrationTestSmsMessaging0013::~CCTSYIntegrationTestSmsMessaging0013()
|
|
1759 |
/**
|
|
1760 |
* Destructor.
|
|
1761 |
*/
|
|
1762 |
{
|
|
1763 |
}
|
|
1764 |
|
|
1765 |
TVerdict CCTSYIntegrationTestSmsMessaging0013::doTestStepL()
|
|
1766 |
/**
|
|
1767 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0013
|
|
1768 |
* @SYMFssID BA/CTSY/SMSM-0013
|
|
1769 |
* @SYMTestCaseDesc Send an SMS with over 140 bytes of content when UCS-2 alphabet & default & extended default 7-bit alphabet is used to encode it
|
|
1770 |
* @SYMTestPriority High
|
|
1771 |
* @SYMTestActions
|
|
1772 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1773 |
* @SYMTestType CIT
|
|
1774 |
* @SYMTestCaseDependencies live/automatic
|
|
1775 |
*
|
|
1776 |
* Reason for test: Verify message sent.
|
|
1777 |
*
|
|
1778 |
* @return - TVerdict code
|
|
1779 |
*/
|
|
1780 |
{
|
|
1781 |
|
|
1782 |
//
|
|
1783 |
// SET UP
|
|
1784 |
//
|
|
1785 |
|
|
1786 |
|
|
1787 |
|
|
1788 |
//
|
|
1789 |
// SET UP END
|
|
1790 |
//
|
|
1791 |
|
|
1792 |
StartTest();
|
|
1793 |
|
|
1794 |
//
|
|
1795 |
// TEST START
|
|
1796 |
//
|
|
1797 |
|
|
1798 |
|
|
1799 |
// === Aim is to send a long message with mixed UCS-2 and default and extended default 7 bit alphabets ===
|
|
1800 |
|
|
1801 |
// Send the SMS message with RMobileSmsMessaging::SendMessage
|
|
1802 |
|
|
1803 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1804 |
|
|
1805 |
|
|
1806 |
//
|
|
1807 |
// TEST END
|
|
1808 |
//
|
|
1809 |
|
|
1810 |
StartCleanup();
|
|
1811 |
|
|
1812 |
// Put any required test clean up here, then remove this comment
|
|
1813 |
|
|
1814 |
return TestStepResult();
|
|
1815 |
}
|
|
1816 |
|
|
1817 |
TPtrC CCTSYIntegrationTestSmsMessaging0013::GetTestStepName()
|
|
1818 |
/**
|
|
1819 |
* @return The test step name.
|
|
1820 |
*/
|
|
1821 |
{
|
|
1822 |
return _L("CCTSYIntegrationTestSmsMessaging0013");
|
|
1823 |
}
|
|
1824 |
|
|
1825 |
|
|
1826 |
|
|
1827 |
CCTSYIntegrationTestSmsMessaging0014::CCTSYIntegrationTestSmsMessaging0014(CEtelSessionMgr& aEtelSessionMgr)
|
|
1828 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1829 |
/**
|
|
1830 |
* Constructor.
|
|
1831 |
*/
|
|
1832 |
{
|
|
1833 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0014::GetTestStepName());
|
|
1834 |
}
|
|
1835 |
|
|
1836 |
CCTSYIntegrationTestSmsMessaging0014::~CCTSYIntegrationTestSmsMessaging0014()
|
|
1837 |
/**
|
|
1838 |
* Destructor.
|
|
1839 |
*/
|
|
1840 |
{
|
|
1841 |
}
|
|
1842 |
|
|
1843 |
TVerdict CCTSYIntegrationTestSmsMessaging0014::doTestStepL()
|
|
1844 |
/**
|
|
1845 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0014
|
|
1846 |
* @SYMFssID BA/CTSY/SMSM-0014
|
|
1847 |
* @SYMTestCaseDesc Send an EMS (Enhanced Messaging Service)
|
|
1848 |
* @SYMTestPriority High
|
|
1849 |
* @SYMTestActions
|
|
1850 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1851 |
* @SYMTestType CIT
|
|
1852 |
* @SYMTestCaseDependencies live/automatic
|
|
1853 |
*
|
|
1854 |
* Reason for test: Verify message sent.
|
|
1855 |
*
|
|
1856 |
* @return - TVerdict code
|
|
1857 |
*/
|
|
1858 |
{
|
|
1859 |
|
|
1860 |
//
|
|
1861 |
// SET UP
|
|
1862 |
//
|
|
1863 |
|
|
1864 |
|
|
1865 |
|
|
1866 |
//
|
|
1867 |
// SET UP END
|
|
1868 |
//
|
|
1869 |
|
|
1870 |
StartTest();
|
|
1871 |
|
|
1872 |
//
|
|
1873 |
// TEST START
|
|
1874 |
//
|
|
1875 |
|
|
1876 |
|
|
1877 |
// === For encoding an EMS see spec 3GPP TS 23.040, GSM 04.11 ===
|
|
1878 |
|
|
1879 |
// === Check the Telephony and STIF code we got to see if someone has already written code ===
|
|
1880 |
|
|
1881 |
// === to encode an EMS. (***remove this comment from your test when you have done it) ===
|
|
1882 |
|
|
1883 |
// Send an EMS (e.g. one containing formatted text) using RMobileSmsMessaging::SendMessage
|
|
1884 |
|
|
1885 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
1886 |
|
|
1887 |
|
|
1888 |
//
|
|
1889 |
// TEST END
|
|
1890 |
//
|
|
1891 |
|
|
1892 |
StartCleanup();
|
|
1893 |
|
|
1894 |
// Put any required test clean up here, then remove this comment
|
|
1895 |
|
|
1896 |
return TestStepResult();
|
|
1897 |
}
|
|
1898 |
|
|
1899 |
TPtrC CCTSYIntegrationTestSmsMessaging0014::GetTestStepName()
|
|
1900 |
/**
|
|
1901 |
* @return The test step name.
|
|
1902 |
*/
|
|
1903 |
{
|
|
1904 |
return _L("CCTSYIntegrationTestSmsMessaging0014");
|
|
1905 |
}
|
|
1906 |
|
|
1907 |
|
|
1908 |
|
|
1909 |
CCTSYIntegrationTestSmsMessaging0015::CCTSYIntegrationTestSmsMessaging0015(CEtelSessionMgr& aEtelSessionMgr)
|
|
1910 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
1911 |
/**
|
|
1912 |
* Constructor.
|
|
1913 |
*/
|
|
1914 |
{
|
|
1915 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0015::GetTestStepName());
|
|
1916 |
}
|
|
1917 |
|
|
1918 |
CCTSYIntegrationTestSmsMessaging0015::~CCTSYIntegrationTestSmsMessaging0015()
|
|
1919 |
/**
|
|
1920 |
* Destructor.
|
|
1921 |
*/
|
|
1922 |
{
|
|
1923 |
}
|
|
1924 |
|
|
1925 |
TVerdict CCTSYIntegrationTestSmsMessaging0015::doTestStepL()
|
|
1926 |
/**
|
|
1927 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0015
|
|
1928 |
* @SYMFssID BA/CTSY/SMSM-0015
|
|
1929 |
* @SYMTestCaseDesc Send an SMS during a call and during active packet connection
|
|
1930 |
* @SYMTestPriority High
|
|
1931 |
* @SYMTestActions RCall::NotifyStatusChange, RPacketContext::NotifyStatusChange, RPacketContext::Activate, RCall::HangUp, RPacketContext::Deactivate, RCall::Dial
|
|
1932 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
1933 |
* @SYMTestType CIT
|
|
1934 |
* @SYMTestCaseDependencies live/automatic
|
|
1935 |
*
|
|
1936 |
* Reason for test: Verify message sent.
|
|
1937 |
*
|
|
1938 |
* @return - TVerdict code
|
|
1939 |
*/
|
|
1940 |
{
|
|
1941 |
|
|
1942 |
//
|
|
1943 |
// SET UP
|
|
1944 |
//
|
|
1945 |
|
|
1946 |
|
|
1947 |
// Get voice line 1.
|
|
1948 |
RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone, KVoiceLine);
|
|
1949 |
|
|
1950 |
// Get call 1.
|
|
1951 |
RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone, KVoiceLine,KCall1 );
|
|
1952 |
|
|
1953 |
// wait until we are on the network
|
|
1954 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
1955 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
1956 |
|
|
1957 |
//
|
|
1958 |
// SET UP END
|
|
1959 |
//
|
|
1960 |
|
|
1961 |
StartTest();
|
|
1962 |
|
|
1963 |
//
|
|
1964 |
// TEST START
|
|
1965 |
//
|
|
1966 |
|
|
1967 |
|
|
1968 |
// === Part one - Send SMS during CS call ===
|
|
1969 |
|
|
1970 |
// post notifier for RCall::NotifyStatusChange
|
|
1971 |
RCall::TStatus callStatus;
|
|
1972 |
TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (call1,&RCall::NotifyStatusChangeCancel);
|
|
1973 |
CleanupStack::PushL(notifyStatusChangeStatus);
|
|
1974 |
call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
|
|
1975 |
|
|
1976 |
// Dial a number that answers with RCall::Dial
|
|
1977 |
TPtrC number;
|
|
1978 |
ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse,
|
|
1979 |
_L("CTestStep::GetStringFromConfig did not complete as expected"));
|
|
1980 |
TCoreEtelRequestStatus<RCall> dialStatus(call1, &RCall::DialCancel);
|
|
1981 |
CleanupStack::PushL(dialStatus);
|
|
1982 |
call1.Dial(dialStatus, number);
|
|
1983 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone,
|
|
1984 |
_L("RCall::Dial timed-out"));
|
|
1985 |
ASSERT_EQUALS(dialStatus.Int(), KErrNone,
|
|
1986 |
_L("RCall::Dial returned with an error"));
|
|
1987 |
|
|
1988 |
// Check RCall::NotifyStatusChange completes with EStatusConnected.
|
|
1989 |
const TInt wantedStatus = KErrNone;
|
|
1990 |
RCall::TStatus expectedCallStatus = RCall::EStatusConnected;
|
|
1991 |
iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
|
|
1992 |
notifyStatusChangeStatus,
|
|
1993 |
callStatus,
|
|
1994 |
expectedCallStatus,
|
|
1995 |
wantedStatus);
|
|
1996 |
call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
|
|
1997 |
|
|
1998 |
// Send the SMS message with RMobileSmsMessaging::SendMessage
|
|
1999 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
2000 |
TBuf8<140> text(_L8("BA-CTSY-INT-SMSM-0015.1"));
|
|
2001 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
2002 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
2003 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes);
|
|
2004 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
2005 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
2006 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
2007 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
2008 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
2009 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
2010 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
2011 |
|
|
2012 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2013 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
2014 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
2015 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
2016 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
2017 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
2018 |
|
|
2019 |
// Hang up call with RCall::HangUp
|
|
2020 |
TCoreEtelRequestStatus<RCall> hangUpStatus (call1,&RCall::HangUpCancel);
|
|
2021 |
CleanupStack::PushL(hangUpStatus);
|
|
2022 |
call1.HangUp(hangUpStatus);
|
|
2023 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone,
|
|
2024 |
_L("RCall::HangUp timed-out"));
|
|
2025 |
ASSERT_EQUALS(hangUpStatus.Int(), KErrNone,
|
|
2026 |
_L("RCall::HangUp returned an error"));
|
|
2027 |
|
|
2028 |
// Check RCall::NotifyStatusChange completes with EStatusIdle.
|
|
2029 |
expectedCallStatus = RCall::EStatusIdle;
|
|
2030 |
iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
|
|
2031 |
notifyStatusChangeStatus,
|
|
2032 |
callStatus,
|
|
2033 |
expectedCallStatus,
|
|
2034 |
wantedStatus);
|
|
2035 |
|
|
2036 |
// === Part two - Send SMS when packet context is active ===
|
|
2037 |
|
|
2038 |
// Activate a primary packet context with RPacketContext::Activate
|
|
2039 |
// Check RPacketContext::NotifyStatusChange completes with EStatusActive
|
|
2040 |
RPacketContext& packetContext = iEtelSessionMgr.GetPrimaryPacketContextL(
|
|
2041 |
KMainServer,
|
|
2042 |
KMainPhone,
|
|
2043 |
KMainPacketService,
|
|
2044 |
KPrimaryPacketContext1);
|
|
2045 |
iPacketServiceTsyTestHelper.ActivatePrimaryPacketContextL(phone,packetContext);
|
|
2046 |
|
|
2047 |
// Send the SMS message with RMobileSmsMessaging::SendMessage
|
|
2048 |
TBuf8<140> text2(_L8("BA-CTSY-INT-SMSM-0015.2"));
|
|
2049 |
pdu = CreateValidSmsMessageL(text2, sendSmsAttributes);
|
|
2050 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
2051 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
2052 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
2053 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
2054 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
2055 |
|
|
2056 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2057 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
2058 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
2059 |
wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
2060 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
2061 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
2062 |
|
|
2063 |
// Post notification for context's status change
|
|
2064 |
TExtEtelRequestStatus notifyContextStChStatus(packetContext, EPacketContextNotifyStatusChange);
|
|
2065 |
CleanupStack::PushL(notifyContextStChStatus);
|
|
2066 |
RPacketContext::TContextStatus packetContextStatus;
|
|
2067 |
packetContext.NotifyStatusChange(notifyContextStChStatus, packetContextStatus);
|
|
2068 |
|
|
2069 |
// Deactivate packet context with RPacketContext::Deactivate
|
|
2070 |
TExtEtelRequestStatus contextDeactivateStatus(packetContext, EPacketContextDeactivate);
|
|
2071 |
CleanupStack::PushL(contextDeactivateStatus);
|
|
2072 |
packetContext.Deactivate(contextDeactivateStatus);
|
|
2073 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(contextDeactivateStatus, ETimeLong), KErrNone,
|
|
2074 |
_L("RPacketContext::Deactivate timed out."));
|
|
2075 |
ASSERT_EQUALS(contextDeactivateStatus.Int(), KErrNone,
|
|
2076 |
_L("RPacketContext::Deactivate returned with error status."));
|
|
2077 |
|
|
2078 |
// Check RPacketContext::NotifyStatusChange completes with EStatusInactive
|
|
2079 |
RPacketContext::TContextStatus expectedPacketContextStatus = RPacketContext::EStatusInactive;
|
|
2080 |
iPacketServiceTsyTestHelper.WaitForPacketContextNotifyStatusChange(
|
|
2081 |
packetContext,
|
|
2082 |
notifyContextStChStatus,
|
|
2083 |
packetContextStatus,
|
|
2084 |
expectedPacketContextStatus,
|
|
2085 |
KErrNone);
|
|
2086 |
|
|
2087 |
|
|
2088 |
//
|
|
2089 |
// TEST END
|
|
2090 |
//
|
|
2091 |
|
|
2092 |
StartCleanup();
|
|
2093 |
|
|
2094 |
// Pop:
|
|
2095 |
// contextDeactivateStatus
|
|
2096 |
// notifyContextStChStatus
|
|
2097 |
// hangUpStatus
|
|
2098 |
// sendSmsRequestStatus
|
|
2099 |
// dialStatus
|
|
2100 |
// notifyStatusChangeStatus
|
|
2101 |
CleanupStack::PopAndDestroy(6,¬ifyStatusChangeStatus);
|
|
2102 |
|
|
2103 |
return TestStepResult();
|
|
2104 |
}
|
|
2105 |
|
|
2106 |
TPtrC CCTSYIntegrationTestSmsMessaging0015::GetTestStepName()
|
|
2107 |
/**
|
|
2108 |
* @return The test step name.
|
|
2109 |
*/
|
|
2110 |
{
|
|
2111 |
return _L("CCTSYIntegrationTestSmsMessaging0015");
|
|
2112 |
}
|
|
2113 |
|
|
2114 |
|
|
2115 |
|
|
2116 |
CCTSYIntegrationTestSmsMessaging0016::CCTSYIntegrationTestSmsMessaging0016(CEtelSessionMgr& aEtelSessionMgr)
|
|
2117 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2118 |
/**
|
|
2119 |
* Constructor.
|
|
2120 |
*/
|
|
2121 |
{
|
|
2122 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0016::GetTestStepName());
|
|
2123 |
}
|
|
2124 |
|
|
2125 |
CCTSYIntegrationTestSmsMessaging0016::~CCTSYIntegrationTestSmsMessaging0016()
|
|
2126 |
/**
|
|
2127 |
* Destructor.
|
|
2128 |
*/
|
|
2129 |
{
|
|
2130 |
}
|
|
2131 |
|
|
2132 |
TVerdict CCTSYIntegrationTestSmsMessaging0016::doTestStepL()
|
|
2133 |
/**
|
|
2134 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0016
|
|
2135 |
* @SYMFssID BA/CTSY/SMSM-0016
|
|
2136 |
* @SYMTestCaseDesc Send SMS when out of coverage
|
|
2137 |
* @SYMTestPriority High
|
|
2138 |
* @SYMTestActions RMobilePhone::NotifyNetworkRegistrationStatusChange
|
|
2139 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
2140 |
* @SYMTestType CIT
|
|
2141 |
* @SYMTestCaseDependencies simulated/manual
|
|
2142 |
*
|
|
2143 |
* Reason for test: Verify message is not sent.
|
|
2144 |
*
|
|
2145 |
* @return - TVerdict code
|
|
2146 |
*/
|
|
2147 |
{
|
|
2148 |
|
|
2149 |
//
|
|
2150 |
// SET UP
|
|
2151 |
//
|
|
2152 |
|
|
2153 |
|
|
2154 |
// Remove the aerial to ensure phone is in a black spot
|
|
2155 |
DisplayUserInteractionPromptL(_L("Remove the aerial to ensure phone is in a black spot."), ETimeMedium);
|
|
2156 |
|
|
2157 |
// Ensure RMobilePhone::GetNetworkRegistrationStatus returns ERegistrationUnknown | ENotRegisteredNoService | ENotRegisteredSearching
|
|
2158 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
2159 |
TExtEtelRequestStatus getNetworkRegistrationStatusStatus(phone,EMobilePhoneGetNetworkRegistrationStatus);
|
|
2160 |
CleanupStack::PushL(getNetworkRegistrationStatusStatus);
|
|
2161 |
RMobilePhone::TMobilePhoneRegistrationStatus phoneRegistrationStatus;
|
|
2162 |
phone.GetNetworkRegistrationStatus(getNetworkRegistrationStatusStatus,phoneRegistrationStatus);
|
|
2163 |
CHECK_EQUALS_L(WaitForRequestWithTimeOut(getNetworkRegistrationStatusStatus, ETimeShort), KErrNone,
|
|
2164 |
_L("RMobilePhone::GetNetworkRegistrationStatus timed-out"));
|
|
2165 |
CHECK_TRUE_L(((phoneRegistrationStatus == RMobilePhone::ERegistrationUnknown) ||
|
|
2166 |
(phoneRegistrationStatus == RMobilePhone::ENotRegisteredNoService) ||
|
|
2167 |
(phoneRegistrationStatus == RMobilePhone::ENotRegisteredSearching)),
|
|
2168 |
_L("RMobilePhone::GetNetworkRegistrationStatus returned with incorrect status."));
|
|
2169 |
|
|
2170 |
//
|
|
2171 |
// SET UP END
|
|
2172 |
//
|
|
2173 |
|
|
2174 |
StartTest();
|
|
2175 |
|
|
2176 |
//
|
|
2177 |
// TEST START
|
|
2178 |
//
|
|
2179 |
|
|
2180 |
|
|
2181 |
// Attempt to send the SMS message with RMobileSmsMessaging::SendMessage
|
|
2182 |
TBuf8<140> text(_L8("BA-CTSY-INT-SMSM-0016.1"));
|
|
2183 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
2184 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
2185 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes);
|
|
2186 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
2187 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
2188 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
2189 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
2190 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
2191 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
2192 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
2193 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
2194 |
|
|
2195 |
// Check an error is returned in aMsgAttributes.iSubmitReport
|
|
2196 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
2197 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
2198 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
2199 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
2200 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
2201 |
|
|
2202 |
// Post Network status change Notifyer to the network
|
|
2203 |
RMobilePhone::TMobilePhoneRegistrationStatus registrationStatus;
|
|
2204 |
TExtEtelRequestStatus reqStatus(phone, EMobilePhoneNotifyNetworkRegistrationStatusChange );
|
|
2205 |
CleanupStack::PushL(reqStatus);
|
|
2206 |
phone.NotifyNetworkRegistrationStatusChange(reqStatus, registrationStatus);
|
|
2207 |
|
|
2208 |
|
|
2209 |
// Put the aerial back
|
|
2210 |
DisplayUserInteractionPromptL(_L("Put the aerial back."), ETimeMedium);
|
|
2211 |
|
|
2212 |
// Check RMobilePhone::NotifyNetworkRegistrationStatusChange completes with aStatus=ERegisteredOnHomeNetwork
|
|
2213 |
iNetworkTsyTestHelper.WaitForMobilePhoneNotifyNetworkRegistrationStatusChange(phone,
|
|
2214 |
reqStatus,
|
|
2215 |
registrationStatus,
|
|
2216 |
RMobilePhone::ERegisteredOnHomeNetwork,
|
|
2217 |
KErrNone );
|
|
2218 |
|
|
2219 |
// Send the SMS message again with RMobileSmsMessaging::SendMessage
|
|
2220 |
TBuf8<140> text2=_L8("BA-CTSY-INT-SMSM-0016.2");
|
|
2221 |
pdu = CreateValidSmsMessageL(text2, sendSmsAttributes);
|
|
2222 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
2223 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
2224 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
2225 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
2226 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
2227 |
|
|
2228 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2229 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
2230 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
2231 |
wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
2232 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
2233 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
2234 |
|
|
2235 |
|
|
2236 |
//
|
|
2237 |
// TEST END
|
|
2238 |
//
|
|
2239 |
|
|
2240 |
StartCleanup();
|
|
2241 |
|
|
2242 |
// Pop:
|
|
2243 |
// reqStatus
|
|
2244 |
// sendSmsRequestStatus
|
|
2245 |
// getNetworkRegistrationStatusStatus
|
|
2246 |
CleanupStack::PopAndDestroy(3,&getNetworkRegistrationStatusStatus);
|
|
2247 |
|
|
2248 |
return TestStepResult();
|
|
2249 |
}
|
|
2250 |
|
|
2251 |
TPtrC CCTSYIntegrationTestSmsMessaging0016::GetTestStepName()
|
|
2252 |
/**
|
|
2253 |
* @return The test step name.
|
|
2254 |
*/
|
|
2255 |
{
|
|
2256 |
return _L("CCTSYIntegrationTestSmsMessaging0016");
|
|
2257 |
}
|
|
2258 |
|
|
2259 |
|
|
2260 |
|
|
2261 |
CCTSYIntegrationTestSmsMessaging0017::CCTSYIntegrationTestSmsMessaging0017(CEtelSessionMgr& aEtelSessionMgr)
|
|
2262 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2263 |
/**
|
|
2264 |
* Constructor.
|
|
2265 |
*/
|
|
2266 |
{
|
|
2267 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0017::GetTestStepName());
|
|
2268 |
}
|
|
2269 |
|
|
2270 |
CCTSYIntegrationTestSmsMessaging0017::~CCTSYIntegrationTestSmsMessaging0017()
|
|
2271 |
/**
|
|
2272 |
* Destructor.
|
|
2273 |
*/
|
|
2274 |
{
|
|
2275 |
}
|
|
2276 |
|
|
2277 |
TVerdict CCTSYIntegrationTestSmsMessaging0017::doTestStepL()
|
|
2278 |
/**
|
|
2279 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0017
|
|
2280 |
* @SYMFssID BA/CTSY/SMSM-0017
|
|
2281 |
* @SYMTestCaseDesc Receive a class 2 SMS message
|
|
2282 |
* @SYMTestPriority High
|
|
2283 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
2284 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
2285 |
* @SYMTestType CIT
|
|
2286 |
* @SYMTestCaseDependencies live/automatic
|
|
2287 |
*
|
|
2288 |
* Reason for test: Verify class 2 message is received.
|
|
2289 |
*
|
|
2290 |
* @return - TVerdict code
|
|
2291 |
*/
|
|
2292 |
{
|
|
2293 |
|
|
2294 |
//
|
|
2295 |
// SET UP
|
|
2296 |
//
|
|
2297 |
|
|
2298 |
|
|
2299 |
// Ensure that the SMS store on the SIM is not full
|
|
2300 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
2301 |
RMobileSmsStore& smsStore = iEtelSessionMgr.GetSmsStoreL(KMainServer,KMainPhone,KMainSmsMessaging,KIccSmsStore);
|
|
2302 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1 storeInfo;
|
|
2303 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
2304 |
CHECK_TRUE_L(iSimTsyTestHelper.EnsureEmptyStoreSpaceL(smsStore,KETelIccSmsStore,storeInfo,phone)>=0,_L("TSimTsyTestHelper::EnsureEmptyStoreSpaceL returned an error"));
|
|
2305 |
|
|
2306 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
2307 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
2308 |
CHECK_EQUALS_L(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
2309 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
2310 |
CHECK_EQUALS_L(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
2311 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
2312 |
|
|
2313 |
|
|
2314 |
//
|
|
2315 |
// SET UP END
|
|
2316 |
//
|
|
2317 |
|
|
2318 |
StartTest();
|
|
2319 |
|
|
2320 |
//
|
|
2321 |
// TEST START
|
|
2322 |
//
|
|
2323 |
|
|
2324 |
|
|
2325 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
2326 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
2327 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
2328 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
2329 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
2330 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
2331 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
2332 |
|
|
2333 |
// Send a class 2 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
2334 |
TBuf8<140> text(_L8("bAA Hello Mobile AAb"));
|
|
2335 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
2336 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
2337 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass2DataCodingScheme,ETrue);
|
|
2338 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
2339 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
2340 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
2341 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
2342 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
2343 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
2344 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
2345 |
|
|
2346 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2347 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
2348 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
2349 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
2350 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
2351 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
2352 |
|
|
2353 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
2354 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
2355 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
2356 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
2357 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
2358 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
2359 |
|
|
2360 |
// Check RMobileSmsMessaging::ReceiveMessage completes with valid store name in aMsgAttributes.iStore
|
|
2361 |
ASSERT_TRUE(receivedSmsAttributes.iStore.Length()>0,_L("RMobileSmsMessaging::ReceiveMessage returned an invalid store name"));
|
|
2362 |
|
|
2363 |
//
|
|
2364 |
// TEST END
|
|
2365 |
//
|
|
2366 |
|
|
2367 |
StartCleanup();
|
|
2368 |
|
|
2369 |
// Pop:
|
|
2370 |
// sendSmsRequestStatus
|
|
2371 |
// receiveSmsRequestStatus
|
|
2372 |
CleanupStack::PopAndDestroy(2,&receiveSmsRequestStatus);
|
|
2373 |
|
|
2374 |
return TestStepResult();
|
|
2375 |
}
|
|
2376 |
|
|
2377 |
TPtrC CCTSYIntegrationTestSmsMessaging0017::GetTestStepName()
|
|
2378 |
/**
|
|
2379 |
* @return The test step name.
|
|
2380 |
*/
|
|
2381 |
{
|
|
2382 |
return _L("CCTSYIntegrationTestSmsMessaging0017");
|
|
2383 |
}
|
|
2384 |
|
|
2385 |
|
|
2386 |
|
|
2387 |
CCTSYIntegrationTestSmsMessaging0018::CCTSYIntegrationTestSmsMessaging0018(CEtelSessionMgr& aEtelSessionMgr)
|
|
2388 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2389 |
/**
|
|
2390 |
* Constructor.
|
|
2391 |
*/
|
|
2392 |
{
|
|
2393 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0018::GetTestStepName());
|
|
2394 |
}
|
|
2395 |
|
|
2396 |
CCTSYIntegrationTestSmsMessaging0018::~CCTSYIntegrationTestSmsMessaging0018()
|
|
2397 |
/**
|
|
2398 |
* Destructor.
|
|
2399 |
*/
|
|
2400 |
{
|
|
2401 |
}
|
|
2402 |
|
|
2403 |
TVerdict CCTSYIntegrationTestSmsMessaging0018::doTestStepL()
|
|
2404 |
/**
|
|
2405 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0018
|
|
2406 |
* @SYMFssID BA/CTSY/SMSM-0018
|
|
2407 |
* @SYMTestCaseDesc Receive a class 2 EMS message
|
|
2408 |
* @SYMTestPriority High
|
|
2409 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
2410 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
2411 |
* @SYMTestType CIT
|
|
2412 |
* @SYMTestCaseDependencies live/automatic
|
|
2413 |
*
|
|
2414 |
* Reason for test: Verify class 2 EMS message is received
|
|
2415 |
*
|
|
2416 |
* @return - TVerdict code
|
|
2417 |
*/
|
|
2418 |
{
|
|
2419 |
|
|
2420 |
//
|
|
2421 |
// SET UP
|
|
2422 |
//
|
|
2423 |
|
|
2424 |
|
|
2425 |
// Ensure that the SMS store on the SIM is not full
|
|
2426 |
|
|
2427 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
2428 |
|
|
2429 |
|
|
2430 |
//
|
|
2431 |
// SET UP END
|
|
2432 |
//
|
|
2433 |
|
|
2434 |
StartTest();
|
|
2435 |
|
|
2436 |
//
|
|
2437 |
// TEST START
|
|
2438 |
//
|
|
2439 |
|
|
2440 |
|
|
2441 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
2442 |
|
|
2443 |
// === Send a class 2 EMS message - See spec 3GPP TS 23.040, GSM 04.11 ===
|
|
2444 |
|
|
2445 |
// Send a class 2 EMS message with RMobileSmsMessaging::SendMessage to the board
|
|
2446 |
|
|
2447 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2448 |
|
|
2449 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
2450 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct originator in aMsgAttributes.iOriginator
|
|
2451 |
// Check RMobileSmsMessaging::ReceiveMessage completes with aMsgAttributes.iStatus=RMobileSmsMessaging::EMtMessageStored
|
|
2452 |
// Check RMobileSmsMessaging::ReceiveMessage completes with valid store name in aMsgAttributes.iStore
|
|
2453 |
|
|
2454 |
|
|
2455 |
//
|
|
2456 |
// TEST END
|
|
2457 |
//
|
|
2458 |
|
|
2459 |
StartCleanup();
|
|
2460 |
|
|
2461 |
// Put any required test clean up here, then remove this comment
|
|
2462 |
|
|
2463 |
return TestStepResult();
|
|
2464 |
}
|
|
2465 |
|
|
2466 |
TPtrC CCTSYIntegrationTestSmsMessaging0018::GetTestStepName()
|
|
2467 |
/**
|
|
2468 |
* @return The test step name.
|
|
2469 |
*/
|
|
2470 |
{
|
|
2471 |
return _L("CCTSYIntegrationTestSmsMessaging0018");
|
|
2472 |
}
|
|
2473 |
|
|
2474 |
|
|
2475 |
|
|
2476 |
CCTSYIntegrationTestSmsMessaging0019::CCTSYIntegrationTestSmsMessaging0019(CEtelSessionMgr& aEtelSessionMgr)
|
|
2477 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2478 |
/**
|
|
2479 |
* Constructor.
|
|
2480 |
*/
|
|
2481 |
{
|
|
2482 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0019::GetTestStepName());
|
|
2483 |
}
|
|
2484 |
|
|
2485 |
CCTSYIntegrationTestSmsMessaging0019::~CCTSYIntegrationTestSmsMessaging0019()
|
|
2486 |
/**
|
|
2487 |
* Destructor.
|
|
2488 |
*/
|
|
2489 |
{
|
|
2490 |
}
|
|
2491 |
|
|
2492 |
TVerdict CCTSYIntegrationTestSmsMessaging0019::doTestStepL()
|
|
2493 |
/**
|
|
2494 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0019
|
|
2495 |
* @SYMFssID BA/CTSY/SMSM-0019
|
|
2496 |
* @SYMTestCaseDesc Receive unsupported and invalid SMS types
|
|
2497 |
* @SYMTestPriority High
|
|
2498 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
2499 |
* @SYMTestExpectedResults Pass - SMS sent successfully.
|
|
2500 |
* @SYMTestType CIT
|
|
2501 |
* @SYMTestCaseDependencies live/automatic
|
|
2502 |
*
|
|
2503 |
* Reason for test: Verify phone does not crash
|
|
2504 |
*
|
|
2505 |
* @return - TVerdict code
|
|
2506 |
*/
|
|
2507 |
{
|
|
2508 |
|
|
2509 |
//
|
|
2510 |
// SET UP
|
|
2511 |
//
|
|
2512 |
|
|
2513 |
|
|
2514 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
2515 |
|
|
2516 |
|
|
2517 |
//
|
|
2518 |
// SET UP END
|
|
2519 |
//
|
|
2520 |
|
|
2521 |
StartTest();
|
|
2522 |
|
|
2523 |
//
|
|
2524 |
// TEST START
|
|
2525 |
//
|
|
2526 |
|
|
2527 |
|
|
2528 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
2529 |
|
|
2530 |
// === Send a SMS message with corrupt headers ===
|
|
2531 |
|
|
2532 |
// Send a SMS message containing corrupt headers with RMobileSmsMessaging::SendMessage to the board
|
|
2533 |
|
|
2534 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2535 |
|
|
2536 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
2537 |
// Check RMobileSmsMessaging::ReceiveMessage completes with aMsgAttributes.iStatus=EMtMessageUnstoredPhoneAck
|
|
2538 |
// Check RMobileSmsMessaging::ReceiveMessage completes with KErrNone
|
|
2539 |
|
|
2540 |
|
|
2541 |
//
|
|
2542 |
// TEST END
|
|
2543 |
//
|
|
2544 |
|
|
2545 |
StartCleanup();
|
|
2546 |
|
|
2547 |
// Put any required test clean up here, then remove this comment
|
|
2548 |
|
|
2549 |
return TestStepResult();
|
|
2550 |
}
|
|
2551 |
|
|
2552 |
TPtrC CCTSYIntegrationTestSmsMessaging0019::GetTestStepName()
|
|
2553 |
/**
|
|
2554 |
* @return The test step name.
|
|
2555 |
*/
|
|
2556 |
{
|
|
2557 |
return _L("CCTSYIntegrationTestSmsMessaging0019");
|
|
2558 |
}
|
|
2559 |
|
|
2560 |
|
|
2561 |
|
|
2562 |
CCTSYIntegrationTestSmsMessaging0020::CCTSYIntegrationTestSmsMessaging0020(CEtelSessionMgr& aEtelSessionMgr)
|
|
2563 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2564 |
/**
|
|
2565 |
* Constructor.
|
|
2566 |
*/
|
|
2567 |
{
|
|
2568 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0020::GetTestStepName());
|
|
2569 |
}
|
|
2570 |
|
|
2571 |
CCTSYIntegrationTestSmsMessaging0020::~CCTSYIntegrationTestSmsMessaging0020()
|
|
2572 |
/**
|
|
2573 |
* Destructor.
|
|
2574 |
*/
|
|
2575 |
{
|
|
2576 |
}
|
|
2577 |
|
|
2578 |
TVerdict CCTSYIntegrationTestSmsMessaging0020::doTestStepL()
|
|
2579 |
/**
|
|
2580 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0020
|
|
2581 |
* @SYMFssID BA/CTSY/SMSM-0020
|
|
2582 |
* @SYMTestCaseDesc Receive SMS during CS call and when packet context is active
|
|
2583 |
* @SYMTestPriority High
|
|
2584 |
* @SYMTestActions RCall::HangUp, RPacketContext::Deactivate, RCall::Dial, RCall::NotifyStatusChange, RMobileSmsMessaging::SendMessage, RPacketContext::NotifyStatusChange, RMobileSmsMessaging::ReceiveMessage
|
|
2585 |
* @SYMTestExpectedResults Pass - SMS received
|
|
2586 |
* @SYMTestType CIT
|
|
2587 |
* @SYMTestCaseDependencies live/automatic
|
|
2588 |
*
|
|
2589 |
* Reason for test: Verify message received.
|
|
2590 |
*
|
|
2591 |
* @return - TVerdict code
|
|
2592 |
*/
|
|
2593 |
{
|
|
2594 |
|
|
2595 |
//
|
|
2596 |
// SET UP
|
|
2597 |
//
|
|
2598 |
|
|
2599 |
|
|
2600 |
// Get call 1
|
|
2601 |
RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone, KVoiceLine,KCall1 );
|
|
2602 |
|
|
2603 |
// Get voice line 1
|
|
2604 |
RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone, KVoiceLine);
|
|
2605 |
|
|
2606 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
2607 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
2608 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
|
|
2609 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
2610 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
2611 |
CHECK_EQUALS_L(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
2612 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
2613 |
CHECK_EQUALS_L(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
2614 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
2615 |
|
|
2616 |
|
|
2617 |
//
|
|
2618 |
// SET UP END
|
|
2619 |
//
|
|
2620 |
|
|
2621 |
StartTest();
|
|
2622 |
|
|
2623 |
//
|
|
2624 |
// TEST START
|
|
2625 |
//
|
|
2626 |
|
|
2627 |
|
|
2628 |
// === Part one - Receive SMS during CS call ===
|
|
2629 |
|
|
2630 |
// post notifier for RCall::NotifyStatusChange
|
|
2631 |
RCall::TStatus callStatus;
|
|
2632 |
TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (call1,&RCall::NotifyStatusChangeCancel);
|
|
2633 |
CleanupStack::PushL(notifyStatusChangeStatus);
|
|
2634 |
call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
|
|
2635 |
|
|
2636 |
// Dial a number that answers with RCall::Dial
|
|
2637 |
TPtrC number;
|
|
2638 |
ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse,
|
|
2639 |
_L("CTestStep::GetStringFromConfig did not complete as expected"));
|
|
2640 |
TCoreEtelRequestStatus<RCall> dialStatus(call1, &RCall::DialCancel);
|
|
2641 |
CleanupStack::PushL(dialStatus);
|
|
2642 |
call1.Dial(dialStatus, number);
|
|
2643 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone,
|
|
2644 |
_L("RCall::Dial timed-out"));
|
|
2645 |
ASSERT_EQUALS(dialStatus.Int(), KErrNone,
|
|
2646 |
_L("RCall::Dial returned with an error"));
|
|
2647 |
|
|
2648 |
// Check RCall::NotifyStatusChange completes with EStatusConnected.
|
|
2649 |
const TInt wantedStatus = KErrNone;
|
|
2650 |
RCall::TStatus expectedCallStatus = RCall::EStatusConnected;
|
|
2651 |
iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
|
|
2652 |
notifyStatusChangeStatus,
|
|
2653 |
callStatus,
|
|
2654 |
expectedCallStatus,
|
|
2655 |
wantedStatus);
|
|
2656 |
|
|
2657 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
2658 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
2659 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
2660 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
2661 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
2662 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
2663 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
2664 |
|
|
2665 |
// Send the SMS message with RMobileSmsMessaging::SendMessage
|
|
2666 |
TBuf8<140> text(_L8("BA-CTSY-INT-SMSM-0020.1"));
|
|
2667 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
2668 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
2669 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,TSmsStoreTsyTestHelper::ENoDataCodingScheme,ETrue);
|
|
2670 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
2671 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
2672 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
2673 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
2674 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
2675 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
2676 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
2677 |
|
|
2678 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2679 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
2680 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
2681 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
2682 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
2683 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
2684 |
|
|
2685 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
2686 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
2687 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
2688 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
2689 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
2690 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
2691 |
|
|
2692 |
// Hang up call with RCall::HangUp
|
|
2693 |
call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
|
|
2694 |
TCoreEtelRequestStatus<RCall> hangUpStatus (call1,&RCall::HangUpCancel);
|
|
2695 |
CleanupStack::PushL(hangUpStatus);
|
|
2696 |
call1.HangUp(hangUpStatus);
|
|
2697 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone,
|
|
2698 |
_L("RCall::HangUp timed-out"));
|
|
2699 |
ASSERT_EQUALS(hangUpStatus.Int(), KErrNone,
|
|
2700 |
_L("RCall::HangUp returned an error"));
|
|
2701 |
|
|
2702 |
// Check RCall::NotifyStatusChange completes with EStatusIdle.
|
|
2703 |
expectedCallStatus = RCall::EStatusIdle;
|
|
2704 |
iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
|
|
2705 |
notifyStatusChangeStatus,
|
|
2706 |
callStatus,
|
|
2707 |
expectedCallStatus,
|
|
2708 |
wantedStatus);
|
|
2709 |
|
|
2710 |
// === Part two - Receive SMS when packet context is active ===
|
|
2711 |
|
|
2712 |
// Activate a primary packet context with RPacketContext::Activate
|
|
2713 |
// Check RPacketContext::NotifyStatusChange completes with EStatusActive
|
|
2714 |
RPacketContext& packetContext = iEtelSessionMgr.GetPrimaryPacketContextL(
|
|
2715 |
KMainServer,
|
|
2716 |
KMainPhone,
|
|
2717 |
KMainPacketService,
|
|
2718 |
KPrimaryPacketContext1);
|
|
2719 |
iPacketServiceTsyTestHelper.ActivatePrimaryPacketContextL(phone,packetContext);
|
|
2720 |
|
|
2721 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
2722 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
2723 |
|
|
2724 |
// Send the SMS message with RMobileSmsMessaging::SendMessage
|
|
2725 |
TBuf8<140> text2(_L8("BA-CTSY-INT-SMSM-0020.2"));
|
|
2726 |
pdu = CreateValidSmsMessageL(text2, sendSmsAttributes,TSmsStoreTsyTestHelper::ENoDataCodingScheme,ETrue);
|
|
2727 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
2728 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
2729 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
2730 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
2731 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
2732 |
|
|
2733 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2734 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
2735 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
2736 |
wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
2737 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
2738 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
2739 |
|
|
2740 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
2741 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
2742 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
2743 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
2744 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
2745 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
2746 |
|
|
2747 |
// Post notification for context's status change
|
|
2748 |
TExtEtelRequestStatus notifyContextStChStatus(packetContext, EPacketContextNotifyStatusChange);
|
|
2749 |
CleanupStack::PushL(notifyContextStChStatus);
|
|
2750 |
RPacketContext::TContextStatus packetContextStatus;
|
|
2751 |
packetContext.NotifyStatusChange(notifyContextStChStatus, packetContextStatus);
|
|
2752 |
|
|
2753 |
// Deactivate packet context with RPacketContext::Deactivate
|
|
2754 |
TExtEtelRequestStatus contextDeactivateStatus(packetContext, EPacketContextDeactivate);
|
|
2755 |
CleanupStack::PushL(contextDeactivateStatus);
|
|
2756 |
packetContext.Deactivate(contextDeactivateStatus);
|
|
2757 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(contextDeactivateStatus, ETimeLong), KErrNone,
|
|
2758 |
_L("RPacketContext::Deactivate timed out."));
|
|
2759 |
ASSERT_EQUALS(contextDeactivateStatus.Int(), KErrNone,
|
|
2760 |
_L("RPacketContext::Deactivate returned with error status."));
|
|
2761 |
|
|
2762 |
// Check RPacketContext::NotifyStatusChange completes with EStatusInactive
|
|
2763 |
RPacketContext::TContextStatus expectedPacketContextStatus = RPacketContext::EStatusInactive;
|
|
2764 |
iPacketServiceTsyTestHelper.WaitForPacketContextNotifyStatusChange(
|
|
2765 |
packetContext,
|
|
2766 |
notifyContextStChStatus,
|
|
2767 |
packetContextStatus,
|
|
2768 |
expectedPacketContextStatus,
|
|
2769 |
KErrNone);
|
|
2770 |
|
|
2771 |
|
|
2772 |
//
|
|
2773 |
// TEST END
|
|
2774 |
//
|
|
2775 |
|
|
2776 |
StartCleanup();
|
|
2777 |
|
|
2778 |
// Pop:
|
|
2779 |
// contextDeactivateStatus
|
|
2780 |
// notifyContextStChStatus
|
|
2781 |
// hangUpStatus
|
|
2782 |
// sendSmsRequestStatus
|
|
2783 |
// receiveSmsRequestStatus
|
|
2784 |
// dialStatus
|
|
2785 |
// notifyStatusChangeStatus
|
|
2786 |
CleanupStack::PopAndDestroy(7,¬ifyStatusChangeStatus);
|
|
2787 |
|
|
2788 |
return TestStepResult();
|
|
2789 |
}
|
|
2790 |
|
|
2791 |
TPtrC CCTSYIntegrationTestSmsMessaging0020::GetTestStepName()
|
|
2792 |
/**
|
|
2793 |
* @return The test step name.
|
|
2794 |
*/
|
|
2795 |
{
|
|
2796 |
return _L("CCTSYIntegrationTestSmsMessaging0020");
|
|
2797 |
}
|
|
2798 |
|
|
2799 |
|
|
2800 |
|
|
2801 |
CCTSYIntegrationTestSmsMessaging0021::CCTSYIntegrationTestSmsMessaging0021(CEtelSessionMgr& aEtelSessionMgr)
|
|
2802 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2803 |
/**
|
|
2804 |
* Constructor.
|
|
2805 |
*/
|
|
2806 |
{
|
|
2807 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0021::GetTestStepName());
|
|
2808 |
}
|
|
2809 |
|
|
2810 |
CCTSYIntegrationTestSmsMessaging0021::~CCTSYIntegrationTestSmsMessaging0021()
|
|
2811 |
/**
|
|
2812 |
* Destructor.
|
|
2813 |
*/
|
|
2814 |
{
|
|
2815 |
}
|
|
2816 |
|
|
2817 |
TVerdict CCTSYIntegrationTestSmsMessaging0021::doTestStepL()
|
|
2818 |
/**
|
|
2819 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0021
|
|
2820 |
* @SYMFssID BA/CTSY/SMSM-0021
|
|
2821 |
* @SYMTestCaseDesc Receive an SMS encoded in default 7-bit alphabet
|
|
2822 |
* @SYMTestPriority High
|
|
2823 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
2824 |
* @SYMTestExpectedResults Pass - SMS received
|
|
2825 |
* @SYMTestType CIT
|
|
2826 |
* @SYMTestCaseDependencies live/automatic
|
|
2827 |
*
|
|
2828 |
* Reason for test: Verify message received.
|
|
2829 |
*
|
|
2830 |
* @return - TVerdict code
|
|
2831 |
*/
|
|
2832 |
{
|
|
2833 |
|
|
2834 |
//
|
|
2835 |
// SET UP
|
|
2836 |
//
|
|
2837 |
|
|
2838 |
|
|
2839 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
2840 |
|
|
2841 |
|
|
2842 |
//
|
|
2843 |
// SET UP END
|
|
2844 |
//
|
|
2845 |
|
|
2846 |
StartTest();
|
|
2847 |
|
|
2848 |
//
|
|
2849 |
// TEST START
|
|
2850 |
//
|
|
2851 |
|
|
2852 |
|
|
2853 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
2854 |
|
|
2855 |
// Send an SMS message encoded iwth default 7-bit alphabet with RMobileSmsMessaging::SendMessage to the board
|
|
2856 |
|
|
2857 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2858 |
|
|
2859 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
2860 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct originator in aMsgAttributes.iOriginator
|
|
2861 |
// Check RMobileSmsMessaging::ReceiveMessage completes with aMsgAttributes.iStatus=EMtMessageUnstoredPhoneAck
|
|
2862 |
|
|
2863 |
// Repeat this test sending and receiving an SMS of maximum length.
|
|
2864 |
|
|
2865 |
|
|
2866 |
//
|
|
2867 |
// TEST END
|
|
2868 |
//
|
|
2869 |
|
|
2870 |
StartCleanup();
|
|
2871 |
|
|
2872 |
// Put any required test clean up here, then remove this comment
|
|
2873 |
|
|
2874 |
return TestStepResult();
|
|
2875 |
}
|
|
2876 |
|
|
2877 |
TPtrC CCTSYIntegrationTestSmsMessaging0021::GetTestStepName()
|
|
2878 |
/**
|
|
2879 |
* @return The test step name.
|
|
2880 |
*/
|
|
2881 |
{
|
|
2882 |
return _L("CCTSYIntegrationTestSmsMessaging0021");
|
|
2883 |
}
|
|
2884 |
|
|
2885 |
|
|
2886 |
|
|
2887 |
CCTSYIntegrationTestSmsMessaging0022::CCTSYIntegrationTestSmsMessaging0022(CEtelSessionMgr& aEtelSessionMgr)
|
|
2888 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2889 |
/**
|
|
2890 |
* Constructor.
|
|
2891 |
*/
|
|
2892 |
{
|
|
2893 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0022::GetTestStepName());
|
|
2894 |
}
|
|
2895 |
|
|
2896 |
CCTSYIntegrationTestSmsMessaging0022::~CCTSYIntegrationTestSmsMessaging0022()
|
|
2897 |
/**
|
|
2898 |
* Destructor.
|
|
2899 |
*/
|
|
2900 |
{
|
|
2901 |
}
|
|
2902 |
|
|
2903 |
TVerdict CCTSYIntegrationTestSmsMessaging0022::doTestStepL()
|
|
2904 |
/**
|
|
2905 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0022
|
|
2906 |
* @SYMFssID BA/CTSY/SMSM-0022
|
|
2907 |
* @SYMTestCaseDesc Receive an SMS encoded in UCS2 alphabet
|
|
2908 |
* @SYMTestPriority High
|
|
2909 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
2910 |
* @SYMTestExpectedResults Pass - SMS received
|
|
2911 |
* @SYMTestType CIT
|
|
2912 |
* @SYMTestCaseDependencies live/automatic
|
|
2913 |
*
|
|
2914 |
* Reason for test: Verify message received.
|
|
2915 |
*
|
|
2916 |
* @return - TVerdict code
|
|
2917 |
*/
|
|
2918 |
{
|
|
2919 |
|
|
2920 |
//
|
|
2921 |
// SET UP
|
|
2922 |
//
|
|
2923 |
|
|
2924 |
|
|
2925 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
2926 |
|
|
2927 |
|
|
2928 |
//
|
|
2929 |
// SET UP END
|
|
2930 |
//
|
|
2931 |
|
|
2932 |
StartTest();
|
|
2933 |
|
|
2934 |
//
|
|
2935 |
// TEST START
|
|
2936 |
//
|
|
2937 |
|
|
2938 |
|
|
2939 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
2940 |
|
|
2941 |
// Send an SMS message encoded in the UCS2 alphabet with RMobileSmsMessaging::SendMessage to the board
|
|
2942 |
|
|
2943 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
2944 |
|
|
2945 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
2946 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct originator in aMsgAttributes.iOriginator
|
|
2947 |
// Check RMobileSmsMessaging::ReceiveMessage completes with aMsgAttributes.iStatus=EMtMessageUnstoredPhoneAck
|
|
2948 |
|
|
2949 |
// Repeat this test sending and receiving an SMS of maximum length.
|
|
2950 |
|
|
2951 |
|
|
2952 |
//
|
|
2953 |
// TEST END
|
|
2954 |
//
|
|
2955 |
|
|
2956 |
StartCleanup();
|
|
2957 |
|
|
2958 |
// Put any required test clean up here, then remove this comment
|
|
2959 |
|
|
2960 |
return TestStepResult();
|
|
2961 |
}
|
|
2962 |
|
|
2963 |
TPtrC CCTSYIntegrationTestSmsMessaging0022::GetTestStepName()
|
|
2964 |
/**
|
|
2965 |
* @return The test step name.
|
|
2966 |
*/
|
|
2967 |
{
|
|
2968 |
return _L("CCTSYIntegrationTestSmsMessaging0022");
|
|
2969 |
}
|
|
2970 |
|
|
2971 |
|
|
2972 |
|
|
2973 |
CCTSYIntegrationTestSmsMessaging0023::CCTSYIntegrationTestSmsMessaging0023(CEtelSessionMgr& aEtelSessionMgr)
|
|
2974 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
2975 |
/**
|
|
2976 |
* Constructor.
|
|
2977 |
*/
|
|
2978 |
{
|
|
2979 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0023::GetTestStepName());
|
|
2980 |
}
|
|
2981 |
|
|
2982 |
CCTSYIntegrationTestSmsMessaging0023::~CCTSYIntegrationTestSmsMessaging0023()
|
|
2983 |
/**
|
|
2984 |
* Destructor.
|
|
2985 |
*/
|
|
2986 |
{
|
|
2987 |
}
|
|
2988 |
|
|
2989 |
TVerdict CCTSYIntegrationTestSmsMessaging0023::doTestStepL()
|
|
2990 |
/**
|
|
2991 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0023
|
|
2992 |
* @SYMFssID BA/CTSY/SMSM-0023
|
|
2993 |
* @SYMTestCaseDesc Receive a concatenated SMS
|
|
2994 |
* @SYMTestPriority High
|
|
2995 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
2996 |
* @SYMTestExpectedResults Pass - SMS received
|
|
2997 |
* @SYMTestType CIT
|
|
2998 |
* @SYMTestCaseDependencies live/automatic
|
|
2999 |
*
|
|
3000 |
* Reason for test: Verify messages are received.
|
|
3001 |
*
|
|
3002 |
* @return - TVerdict code
|
|
3003 |
*/
|
|
3004 |
{
|
|
3005 |
|
|
3006 |
//
|
|
3007 |
// SET UP
|
|
3008 |
//
|
|
3009 |
|
|
3010 |
|
|
3011 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
3012 |
|
|
3013 |
|
|
3014 |
//
|
|
3015 |
// SET UP END
|
|
3016 |
//
|
|
3017 |
|
|
3018 |
StartTest();
|
|
3019 |
|
|
3020 |
//
|
|
3021 |
// TEST START
|
|
3022 |
//
|
|
3023 |
|
|
3024 |
|
|
3025 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3026 |
|
|
3027 |
// === Send a long SMS message made up of 3 individual SMSs ===
|
|
3028 |
|
|
3029 |
// Send first part of the SMS message with RMobileSmsMessaging::SendMessage specifying aMsgAttributes.iMore=ETrue
|
|
3030 |
|
|
3031 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3032 |
|
|
3033 |
// Send second part of the SMS message with RMobileSmsMessaging::SendMessage specifying aMsgAttributes.iMore=ETrue
|
|
3034 |
|
|
3035 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3036 |
|
|
3037 |
// Send third part of the SMS message with RMobileSmsMessaging::SendMessage specifying aMsgAttributes.iMore=EFalse
|
|
3038 |
|
|
3039 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3040 |
|
|
3041 |
// === Check that each part is received correctly ===
|
|
3042 |
|
|
3043 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3044 |
// Check RMobileSmsMessaging::ReceiveMessage completes with aMsgAttributes.iStatus=EMtMessageUnstoredPhoneAck
|
|
3045 |
|
|
3046 |
// Repost RMobileSmsMessaging::ReceiveMessage immediately to wait for next incoming SMS
|
|
3047 |
|
|
3048 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3049 |
// Check RMobileSmsMessaging::ReceiveMessage completes with aMsgAttributes.iStatus=EMtMessageUnstoredPhoneAck
|
|
3050 |
|
|
3051 |
// Repost RMobileSmsMessaging::ReceiveMessage immediately to wait for next incoming SMS
|
|
3052 |
|
|
3053 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3054 |
// Check RMobileSmsMessaging::ReceiveMessage completes with aMsgAttributes.iStatus=EMtMessageUnstoredPhoneAck
|
|
3055 |
|
|
3056 |
|
|
3057 |
//
|
|
3058 |
// TEST END
|
|
3059 |
//
|
|
3060 |
|
|
3061 |
StartCleanup();
|
|
3062 |
|
|
3063 |
// Put any required test clean up here, then remove this comment
|
|
3064 |
|
|
3065 |
return TestStepResult();
|
|
3066 |
}
|
|
3067 |
|
|
3068 |
TPtrC CCTSYIntegrationTestSmsMessaging0023::GetTestStepName()
|
|
3069 |
/**
|
|
3070 |
* @return The test step name.
|
|
3071 |
*/
|
|
3072 |
{
|
|
3073 |
return _L("CCTSYIntegrationTestSmsMessaging0023");
|
|
3074 |
}
|
|
3075 |
|
|
3076 |
|
|
3077 |
|
|
3078 |
CCTSYIntegrationTestSmsMessaging0024::CCTSYIntegrationTestSmsMessaging0024(CEtelSessionMgr& aEtelSessionMgr)
|
|
3079 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
3080 |
/**
|
|
3081 |
* Constructor.
|
|
3082 |
*/
|
|
3083 |
{
|
|
3084 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0024::GetTestStepName());
|
|
3085 |
}
|
|
3086 |
|
|
3087 |
CCTSYIntegrationTestSmsMessaging0024::~CCTSYIntegrationTestSmsMessaging0024()
|
|
3088 |
/**
|
|
3089 |
* Destructor.
|
|
3090 |
*/
|
|
3091 |
{
|
|
3092 |
}
|
|
3093 |
|
|
3094 |
TVerdict CCTSYIntegrationTestSmsMessaging0024::doTestStepL()
|
|
3095 |
/**
|
|
3096 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0024
|
|
3097 |
* @SYMFssID BA/CTSY/SMSM-0024
|
|
3098 |
* @SYMTestCaseDesc Receive a class 0 SMS message
|
|
3099 |
* @SYMTestPriority High
|
|
3100 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
3101 |
* @SYMTestExpectedResults Pass - SMS received
|
|
3102 |
* @SYMTestType CIT
|
|
3103 |
* @SYMTestCaseDependencies live/automatic
|
|
3104 |
*
|
|
3105 |
* Reason for test: Verify message received.
|
|
3106 |
*
|
|
3107 |
* @return - TVerdict code
|
|
3108 |
*/
|
|
3109 |
{
|
|
3110 |
|
|
3111 |
//
|
|
3112 |
// SET UP
|
|
3113 |
//
|
|
3114 |
|
|
3115 |
|
|
3116 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
3117 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
3118 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
3119 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
3120 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
3121 |
ASSERT_EQUALS(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
3122 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
3123 |
|
|
3124 |
|
|
3125 |
//
|
|
3126 |
// SET UP END
|
|
3127 |
//
|
|
3128 |
|
|
3129 |
StartTest();
|
|
3130 |
|
|
3131 |
//
|
|
3132 |
// TEST START
|
|
3133 |
//
|
|
3134 |
|
|
3135 |
|
|
3136 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3137 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
3138 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
3139 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
3140 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
3141 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
3142 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
3143 |
|
|
3144 |
// Send a class 0 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
3145 |
TBuf8<140> text(_L8("cAA Hello Mobile AAc"));
|
|
3146 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
3147 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
3148 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass0DataCodingScheme,ETrue);
|
|
3149 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
3150 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
3151 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
3152 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
3153 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
3154 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
3155 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
3156 |
|
|
3157 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3158 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
3159 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
3160 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
3161 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
3162 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
3163 |
|
|
3164 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3165 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
3166 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3167 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
3168 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3169 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
3170 |
|
|
3171 |
|
|
3172 |
//
|
|
3173 |
// TEST END
|
|
3174 |
//
|
|
3175 |
|
|
3176 |
StartCleanup();
|
|
3177 |
|
|
3178 |
// Pop:
|
|
3179 |
// sendSmsRequestStatus
|
|
3180 |
// receiveSmsRequestStatus
|
|
3181 |
CleanupStack::PopAndDestroy(2,&receiveSmsRequestStatus);
|
|
3182 |
|
|
3183 |
return TestStepResult();
|
|
3184 |
}
|
|
3185 |
|
|
3186 |
TPtrC CCTSYIntegrationTestSmsMessaging0024::GetTestStepName()
|
|
3187 |
/**
|
|
3188 |
* @return The test step name.
|
|
3189 |
*/
|
|
3190 |
{
|
|
3191 |
return _L("CCTSYIntegrationTestSmsMessaging0024");
|
|
3192 |
}
|
|
3193 |
|
|
3194 |
|
|
3195 |
|
|
3196 |
CCTSYIntegrationTestSmsMessaging0025::CCTSYIntegrationTestSmsMessaging0025(CEtelSessionMgr& aEtelSessionMgr)
|
|
3197 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
3198 |
/**
|
|
3199 |
* Constructor.
|
|
3200 |
*/
|
|
3201 |
{
|
|
3202 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0025::GetTestStepName());
|
|
3203 |
}
|
|
3204 |
|
|
3205 |
CCTSYIntegrationTestSmsMessaging0025::~CCTSYIntegrationTestSmsMessaging0025()
|
|
3206 |
/**
|
|
3207 |
* Destructor.
|
|
3208 |
*/
|
|
3209 |
{
|
|
3210 |
}
|
|
3211 |
|
|
3212 |
TVerdict CCTSYIntegrationTestSmsMessaging0025::doTestStepL()
|
|
3213 |
/**
|
|
3214 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0025
|
|
3215 |
* @SYMFssID BA/CTSY/SMSM-0025
|
|
3216 |
* @SYMTestCaseDesc Receive and store a class 1 SMS message
|
|
3217 |
* @SYMTestPriority High
|
|
3218 |
* @SYMTestActions RMobileSmsMessaging::AckSmsStored, RMobilePhoneStore::NotifyStoreEvent, RMobilePhoneStore::Write, RMobileSmsMessaging::ReceiveMessage, RMobilePhoneStore::Read
|
|
3219 |
* @SYMTestExpectedResults Pass - SMS message is received and stored.
|
|
3220 |
* @SYMTestType CIT
|
|
3221 |
* @SYMTestCaseDependencies live/automatic
|
|
3222 |
*
|
|
3223 |
* Reason for test: Verify message received and stored in SMS store.
|
|
3224 |
*
|
|
3225 |
* @return - TVerdict code
|
|
3226 |
*/
|
|
3227 |
{
|
|
3228 |
|
|
3229 |
//
|
|
3230 |
// SET UP
|
|
3231 |
//
|
|
3232 |
|
|
3233 |
|
|
3234 |
// Ensure RMobilePhoneStore::GetInfo on the SMS store returns iCaps in set of KCapsReadAccess | KCapsWriteAccess
|
|
3235 |
RMobileSmsStore& smsStore = iEtelSessionMgr.GetSmsStoreL(KMainServer,KMainPhone,KMainSmsMessaging,KIccSmsStore);
|
|
3236 |
TExtEtelRequestStatus getInfoStatus (smsStore,EMobilePhoneStoreGetInfo);
|
|
3237 |
CleanupStack::PushL(getInfoStatus);
|
|
3238 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1 storeInfo;
|
|
3239 |
RMobileSmsStore::TMobilePhoneStoreInfoV1Pckg storeInfoPckg (storeInfo);
|
|
3240 |
smsStore.GetInfo(getInfoStatus,storeInfoPckg);
|
|
3241 |
CHECK_EQUALS_L(WaitForRequestWithTimeOut(getInfoStatus, ETimeMedium), KErrNone,_L("RMobileSmsStore::GetInfo timed out"));
|
|
3242 |
CHECK_EQUALS_L(getInfoStatus.Int(), KErrNone, _L("RMobileSmsStore::GetInfo returned an error"));
|
|
3243 |
CHECK_BITS_SET_L(storeInfo.iCaps, (RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess) ,KNoUnwantedBits, _L("RMobilePhoneStore::GetInfo returned incorrect store caps"));
|
|
3244 |
|
|
3245 |
// Ensure that the SMS store is not full
|
|
3246 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
3247 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
3248 |
TInt clearSpace=iSimTsyTestHelper.EnsureEmptyStoreSpaceL(smsStore,KETelIccSmsStore,storeInfo,phone);
|
|
3249 |
CHECK_TRUE_L(clearSpace>=0,_L("TSimTsyTestHelper::TSimTsyTestHelper::EnsureEmptyStoreSpaceL returned an error"));
|
|
3250 |
|
|
3251 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
3252 |
DEBUG_PRINTF1(_L("Checking RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=RMobileSmsMessaging::EReceiveUnstoredClientAck"));
|
|
3253 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
3254 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
3255 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
3256 |
ASSERT_EQUALS(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
3257 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
3258 |
|
|
3259 |
|
|
3260 |
//
|
|
3261 |
// SET UP END
|
|
3262 |
//
|
|
3263 |
|
|
3264 |
StartTest();
|
|
3265 |
|
|
3266 |
//
|
|
3267 |
// TEST START
|
|
3268 |
//
|
|
3269 |
|
|
3270 |
|
|
3271 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3272 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
3273 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
3274 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
3275 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
3276 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
3277 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
3278 |
|
|
3279 |
// Send a class 1 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
3280 |
TBuf8<140> text(_L8("eAA Hello Mobile"));
|
|
3281 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
3282 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
3283 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass1DataCodingScheme,ETrue);
|
|
3284 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
3285 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
3286 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
3287 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
3288 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
3289 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
3290 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
3291 |
|
|
3292 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3293 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
3294 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
3295 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
3296 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
3297 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
3298 |
|
|
3299 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3300 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
3301 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3302 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
3303 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3304 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
3305 |
|
|
3306 |
// post notifier for RMobilePhoneStore::NotifyStoreEvent
|
|
3307 |
TExtEtelRequestStatus notifyStoreEventStatus (smsStore,EMobilePhoneStoreNotifyStoreEvent);
|
|
3308 |
CleanupStack::PushL(notifyStoreEventStatus);
|
|
3309 |
TUint32 storeEvent;
|
|
3310 |
TInt index;
|
|
3311 |
smsStore.NotifyStoreEvent(notifyStoreEventStatus, storeEvent, index);
|
|
3312 |
|
|
3313 |
// Write the received SMS message to the SMS store using RMobilePhoneStore::Write
|
|
3314 |
RMobileSmsStore::TMobileGsmSmsEntryV1 entry;
|
|
3315 |
RMobileSmsStore::TMobileGsmSmsEntryV1Pckg pckgEntry(entry);
|
|
3316 |
|
|
3317 |
entry.iServiceCentre.iTypeOfNumber = receivedSmsAttributes.iGsmServiceCentre.iTypeOfNumber;
|
|
3318 |
entry.iServiceCentre.iNumberPlan = receivedSmsAttributes.iGsmServiceCentre.iNumberPlan;
|
|
3319 |
entry.iServiceCentre.iTelNumber = receivedSmsAttributes.iGsmServiceCentre.iTelNumber;
|
|
3320 |
entry.iMsgStatus = RMobileSmsStore::EStoredMessageUnread;
|
|
3321 |
entry.iMsgData=gsmMsg;
|
|
3322 |
entry.iIndex = clearSpace;
|
|
3323 |
TExtEtelRequestStatus writeStatus(smsStore, EMobilePhoneStoreWrite);
|
|
3324 |
CleanupStack::PushL(writeStatus);
|
|
3325 |
smsStore.Write(writeStatus,pckgEntry);
|
|
3326 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(writeStatus, ETimeMedium),KErrNone, _L("RMobileSmsStore::Write timed out"));
|
|
3327 |
ASSERT_EQUALS(writeStatus.Int(), KErrNone, _L("RMobileSmsStore::Write returned an error"));
|
|
3328 |
|
|
3329 |
|
|
3330 |
// Check RMobilePhoneStore::NotifyStoreEvent completes with RMobilePhoneStore::KStoreEntryAdded
|
|
3331 |
RMobilePhoneStore::TMobileStoreEvent expectedEvent = RMobilePhoneStore::KStoreEntryAdded ;
|
|
3332 |
iSmsStoreTsyTestHelper.WaitForSmsStoreNotifyStoreEvent( smsStore,
|
|
3333 |
notifyStoreEventStatus,
|
|
3334 |
storeEvent,
|
|
3335 |
expectedEvent,
|
|
3336 |
index);
|
|
3337 |
|
|
3338 |
// Acknowledge that the SMS has been decoded and stored with RMobileSmsMessaging::AckSmsStored sending the delivery report in aMsgData
|
|
3339 |
TExtEtelRequestStatus ackStatus(smsMessaging, EMobileSmsMessagingAckSmsStored);
|
|
3340 |
CleanupStack::PushL(ackStatus);
|
|
3341 |
RMobileSmsMessaging::TMobileSmsGsmTpdu ackPdu;
|
|
3342 |
ackPdu.SetLength(0);
|
|
3343 |
TUint8 messageTypeIndicator=0x00; //0 deliver and deliver report; 1 submit and submit report; 2 status report and command
|
|
3344 |
TUint8 userDataHeaderIndicator=0x00; //0 no header; 0x40 has header
|
|
3345 |
ackPdu.Append(messageTypeIndicator | userDataHeaderIndicator);
|
|
3346 |
TUint8 tpParameterIndicator=0x00;
|
|
3347 |
ackPdu.Append(tpParameterIndicator);
|
|
3348 |
smsMessaging.AckSmsStored(ackStatus,ackPdu);
|
|
3349 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(ackStatus, ETimeVeryLong),KErrNone, _L("RMobilePhone::AckSmsStored timed out"));
|
|
3350 |
ASSERT_EQUALS(ackStatus.Int(), KErrNone, _L("RMobilePhone::AckSmsStored returned an error"));
|
|
3351 |
|
|
3352 |
// Read the SMS message that has just been stored and check that the contents is the same as that received
|
|
3353 |
RMobileSmsStore::TMobileGsmSmsEntryV1 readEntry;
|
|
3354 |
RMobileSmsStore::TMobileGsmSmsEntryV1Pckg readEntryPckg(readEntry);
|
|
3355 |
readEntry.iIndex = clearSpace;
|
|
3356 |
readEntry.iMsgData.Zero();
|
|
3357 |
readEntry.iMsgStatus = RMobileSmsStore::EStoredMessageUnknownStatus;
|
|
3358 |
TExtEtelRequestStatus readStatus (smsStore,EMobilePhoneStoreRead);
|
|
3359 |
CleanupStack::PushL(readStatus);
|
|
3360 |
smsStore.Read(readStatus,readEntryPckg);
|
|
3361 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(readStatus, ETimeMedium),KErrNone,_L("RMobileSmsStore::Read timed out"));
|
|
3362 |
ASSERT_EQUALS(readStatus.Int(), KErrNone, _L("RMobileSmsStore::Read returned an error"));
|
|
3363 |
ASSERT_EQUALS(readEntry.iMsgStatus,RMobileSmsStore::EStoredMessageUnread,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3364 |
ASSERT_EQUALS(readEntry.iServiceCentre.iTypeOfNumber,receivedSmsAttributes.iGsmServiceCentre.iTypeOfNumber,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3365 |
ASSERT_EQUALS(readEntry.iServiceCentre.iNumberPlan,receivedSmsAttributes.iGsmServiceCentre.iNumberPlan,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3366 |
ASSERT_EQUALS_DES16(readEntry.iServiceCentre.iTelNumber,receivedSmsAttributes.iGsmServiceCentre.iTelNumber,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3367 |
ASSERT_EQUALS_DES8(readEntry.iMsgData,gsmMsg,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3368 |
|
|
3369 |
//
|
|
3370 |
// TEST END
|
|
3371 |
//
|
|
3372 |
|
|
3373 |
StartCleanup();
|
|
3374 |
|
|
3375 |
// Pop:
|
|
3376 |
// readStatus
|
|
3377 |
// ackStatus
|
|
3378 |
// writeStatus
|
|
3379 |
// notifyStoreEventStatus
|
|
3380 |
// sendSmsRequestStatus
|
|
3381 |
// receiveSmsRequestStatus
|
|
3382 |
// getInfoStatus
|
|
3383 |
CleanupStack::PopAndDestroy(7,&getInfoStatus);
|
|
3384 |
|
|
3385 |
return TestStepResult();
|
|
3386 |
}
|
|
3387 |
|
|
3388 |
TPtrC CCTSYIntegrationTestSmsMessaging0025::GetTestStepName()
|
|
3389 |
/**
|
|
3390 |
* @return The test step name.
|
|
3391 |
*/
|
|
3392 |
{
|
|
3393 |
return _L("CCTSYIntegrationTestSmsMessaging0025");
|
|
3394 |
}
|
|
3395 |
|
|
3396 |
|
|
3397 |
|
|
3398 |
CCTSYIntegrationTestSmsMessaging0026::CCTSYIntegrationTestSmsMessaging0026(CEtelSessionMgr& aEtelSessionMgr)
|
|
3399 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
3400 |
/**
|
|
3401 |
* Constructor.
|
|
3402 |
*/
|
|
3403 |
{
|
|
3404 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0026::GetTestStepName());
|
|
3405 |
}
|
|
3406 |
|
|
3407 |
CCTSYIntegrationTestSmsMessaging0026::~CCTSYIntegrationTestSmsMessaging0026()
|
|
3408 |
/**
|
|
3409 |
* Destructor.
|
|
3410 |
*/
|
|
3411 |
{
|
|
3412 |
}
|
|
3413 |
|
|
3414 |
TVerdict CCTSYIntegrationTestSmsMessaging0026::doTestStepL()
|
|
3415 |
/**
|
|
3416 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0026
|
|
3417 |
* @SYMFssID BA/CTSY/SMSM-0026
|
|
3418 |
* @SYMTestCaseDesc Receive and store a class 2 SMS message
|
|
3419 |
* @SYMTestPriority High
|
|
3420 |
* @SYMTestActions RMobileSmsMessaging::AckSmsStored, RMobilePhoneStore::NotifyStoreEvent, RMobilePhoneStore::Write, RMobileSmsMessaging::ReceiveMessage, RMobilePhoneStore::Read
|
|
3421 |
* @SYMTestExpectedResults Pass - SMS message is received and stored.
|
|
3422 |
* @SYMTestType CIT
|
|
3423 |
* @SYMTestCaseDependencies live/automatic
|
|
3424 |
*
|
|
3425 |
* Reason for test: Verify message received and stored in SMS store.
|
|
3426 |
*
|
|
3427 |
* @return - TVerdict code
|
|
3428 |
*/
|
|
3429 |
{
|
|
3430 |
|
|
3431 |
//
|
|
3432 |
// SET UP
|
|
3433 |
//
|
|
3434 |
|
|
3435 |
// Ensure RMobilePhoneStore::GetInfo on the SMS store returns iCaps in set of KCapsReadAccess | KCapsWriteAccess
|
|
3436 |
RMobileSmsStore& smsStore = iEtelSessionMgr.GetSmsStoreL(KMainServer,KMainPhone,KMainSmsMessaging,KIccSmsStore);
|
|
3437 |
TExtEtelRequestStatus getInfoStatus (smsStore,EMobilePhoneStoreGetInfo);
|
|
3438 |
CleanupStack::PushL(getInfoStatus);
|
|
3439 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1 storeInfo;
|
|
3440 |
RMobileSmsStore::TMobilePhoneStoreInfoV1Pckg storeInfoPckg (storeInfo);
|
|
3441 |
smsStore.GetInfo(getInfoStatus,storeInfoPckg);
|
|
3442 |
CHECK_EQUALS_L(WaitForRequestWithTimeOut(getInfoStatus, ETimeMedium), KErrNone,_L("RMobileSmsStore::GetInfo timed out"));
|
|
3443 |
CHECK_EQUALS_L(getInfoStatus.Int(), KErrNone, _L("RMobileSmsStore::GetInfo returned an error"));
|
|
3444 |
CHECK_BITS_SET_L(storeInfo.iCaps, (RMobilePhoneStore::KCapsReadAccess | RMobilePhoneStore::KCapsWriteAccess) ,KNoUnwantedBits, _L("RMobilePhoneStore::GetInfo returned incorrect store caps"));
|
|
3445 |
|
|
3446 |
// Ensure that the SMS store is not full
|
|
3447 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
3448 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
3449 |
TInt clearSpace=iSimTsyTestHelper.EnsureEmptyStoreSpaceL(smsStore,KETelIccSmsStore,storeInfo,phone);
|
|
3450 |
CHECK_TRUE_L(clearSpace>=0,_L("TSimTsyTestHelper::TSimTsyTestHelper::EnsureEmptyStoreSpaceL returned an error"));
|
|
3451 |
|
|
3452 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
3453 |
DEBUG_PRINTF1(_L("Checking RMobileSmsMessaging::GetReceiveMode returns aReceiveMode=RMobileSmsMessaging::EReceiveUnstoredClientAck"));
|
|
3454 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
3455 |
ASSERT_EQUALS(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
3456 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
3457 |
ASSERT_EQUALS(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
3458 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
3459 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
3460 |
|
|
3461 |
//
|
|
3462 |
// SET UP END
|
|
3463 |
//
|
|
3464 |
|
|
3465 |
StartTest();
|
|
3466 |
|
|
3467 |
//
|
|
3468 |
// TEST START
|
|
3469 |
//
|
|
3470 |
|
|
3471 |
|
|
3472 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3473 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
3474 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
3475 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
3476 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
3477 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
3478 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
3479 |
|
|
3480 |
// Send a class 2 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
3481 |
TBuf8<140> text(_L8("BA-CTSY-INT-SMSM-0026.1"));
|
|
3482 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
3483 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
3484 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass2DataCodingScheme,ETrue);
|
|
3485 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
3486 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
3487 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
3488 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
3489 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
3490 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
3491 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
3492 |
|
|
3493 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3494 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
3495 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
3496 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
3497 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
3498 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
3499 |
|
|
3500 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3501 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
3502 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3503 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
3504 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3505 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
3506 |
|
|
3507 |
|
|
3508 |
// post notifier for RMobilePhoneStore::NotifyStoreEvent
|
|
3509 |
TExtEtelRequestStatus notifyStoreEventStatus (smsStore,EMobilePhoneStoreNotifyStoreEvent);
|
|
3510 |
CleanupStack::PushL(notifyStoreEventStatus);
|
|
3511 |
TUint32 storeEvent;
|
|
3512 |
TInt index;
|
|
3513 |
smsStore.NotifyStoreEvent(notifyStoreEventStatus, storeEvent, index);
|
|
3514 |
|
|
3515 |
// Write the received SMS message to the SMS store using RMobilePhoneStore::Write
|
|
3516 |
RMobileSmsStore::TMobileGsmSmsEntryV1 entry;
|
|
3517 |
RMobileSmsStore::TMobileGsmSmsEntryV1Pckg pckgEntry(entry);
|
|
3518 |
entry.iServiceCentre.iTypeOfNumber = receivedSmsAttributes.iGsmServiceCentre.iTypeOfNumber;
|
|
3519 |
entry.iServiceCentre.iNumberPlan = receivedSmsAttributes.iGsmServiceCentre.iNumberPlan;
|
|
3520 |
entry.iServiceCentre.iTelNumber = receivedSmsAttributes.iGsmServiceCentre.iTelNumber;
|
|
3521 |
entry.iMsgStatus = RMobileSmsStore::EStoredMessageUnread;
|
|
3522 |
entry.iMsgData=gsmMsg;
|
|
3523 |
entry.iIndex = clearSpace;
|
|
3524 |
TExtEtelRequestStatus writeStatus(smsStore, EMobilePhoneStoreWrite);
|
|
3525 |
CleanupStack::PushL(writeStatus);
|
|
3526 |
smsStore.Write(writeStatus,pckgEntry);
|
|
3527 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(writeStatus, ETimeMedium),KErrNone, _L("RMobileSmsStore::Write timed out"));
|
|
3528 |
ASSERT_EQUALS(writeStatus.Int(), KErrNone, _L("RMobileSmsStore::Write returned an error"));
|
|
3529 |
|
|
3530 |
// Check RMobilePhoneStore::NotifyStoreEvent completes with RMobilePhoneStore::KStoreEntryAdded
|
|
3531 |
RMobilePhoneStore::TMobileStoreEvent expectedEvent = RMobilePhoneStore::KStoreEntryAdded ;
|
|
3532 |
iSmsStoreTsyTestHelper.WaitForSmsStoreNotifyStoreEvent( smsStore,
|
|
3533 |
notifyStoreEventStatus,
|
|
3534 |
storeEvent,
|
|
3535 |
expectedEvent,
|
|
3536 |
index);
|
|
3537 |
|
|
3538 |
// Acknowledge that the SMS has been decoded and stored with RMobileSmsMessaging::AckSmsStored sending the delivery report in aMsgData
|
|
3539 |
TExtEtelRequestStatus ackStatus(smsMessaging, EMobileSmsMessagingAckSmsStored);
|
|
3540 |
CleanupStack::PushL(ackStatus);
|
|
3541 |
RMobileSmsMessaging::TMobileSmsGsmTpdu ackPdu;
|
|
3542 |
ackPdu.SetLength(0);
|
|
3543 |
TUint8 messageTypeIndicator=0x00; //0 deliver and deliver report; 1 submit and submit report; 2 status report and command
|
|
3544 |
TUint8 userDataHeaderIndicator=0x00; //0 no header; 0x40 has header
|
|
3545 |
ackPdu.Append(messageTypeIndicator | userDataHeaderIndicator);
|
|
3546 |
TUint8 tpParameterIndicator=0x00;
|
|
3547 |
ackPdu.Append(tpParameterIndicator);
|
|
3548 |
smsMessaging.AckSmsStored(ackStatus,ackPdu);
|
|
3549 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(ackStatus, ETimeVeryLong),KErrNone, _L("RMobilePhone::AckSmsStored timed out"));
|
|
3550 |
ASSERT_EQUALS(ackStatus.Int(), KErrNone, _L("RMobilePhone::AckSmsStored returned an error"));
|
|
3551 |
|
|
3552 |
// Read the SMS message that has just been stored and check that the contents is the same as that received
|
|
3553 |
RMobileSmsStore::TMobileGsmSmsEntryV1 readEntry;
|
|
3554 |
RMobileSmsStore::TMobileGsmSmsEntryV1Pckg readEntryPckg(readEntry);
|
|
3555 |
readEntry.iIndex = clearSpace;
|
|
3556 |
readEntry.iMsgData.Zero();
|
|
3557 |
readEntry.iMsgStatus = RMobileSmsStore::EStoredMessageUnknownStatus;
|
|
3558 |
TExtEtelRequestStatus readStatus (smsStore,EMobilePhoneStoreRead);
|
|
3559 |
CleanupStack::PushL(readStatus);
|
|
3560 |
smsStore.Read(readStatus,readEntryPckg);
|
|
3561 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(readStatus, ETimeMedium),KErrNone,_L("RMobileSmsStore::Read timed out"));
|
|
3562 |
ASSERT_EQUALS(readStatus.Int(), KErrNone, _L("RMobileSmsStore::Read returned an error"));
|
|
3563 |
ASSERT_EQUALS(readEntry.iMsgStatus,RMobileSmsStore::EStoredMessageUnread,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3564 |
ASSERT_EQUALS(readEntry.iServiceCentre.iTypeOfNumber,receivedSmsAttributes.iGsmServiceCentre.iTypeOfNumber,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3565 |
ASSERT_EQUALS(readEntry.iServiceCentre.iNumberPlan,receivedSmsAttributes.iGsmServiceCentre.iNumberPlan,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3566 |
ASSERT_EQUALS_DES16(readEntry.iServiceCentre.iTelNumber,receivedSmsAttributes.iGsmServiceCentre.iTelNumber,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3567 |
ASSERT_EQUALS_DES8(readEntry.iMsgData,gsmMsg,_L("RMobileSmsStore::Read returned incorrect data"));
|
|
3568 |
|
|
3569 |
|
|
3570 |
//
|
|
3571 |
// TEST END
|
|
3572 |
//
|
|
3573 |
|
|
3574 |
StartCleanup();
|
|
3575 |
|
|
3576 |
// Pop:
|
|
3577 |
// readStatus
|
|
3578 |
// ackStatus
|
|
3579 |
// writeStatus
|
|
3580 |
// notifyStoreEventStatus
|
|
3581 |
// sendSmsRequestStatus
|
|
3582 |
// receiveSmsRequestStatus
|
|
3583 |
// getInfoStatus
|
|
3584 |
CleanupStack::PopAndDestroy(7,&getInfoStatus);
|
|
3585 |
|
|
3586 |
return TestStepResult();
|
|
3587 |
}
|
|
3588 |
|
|
3589 |
TPtrC CCTSYIntegrationTestSmsMessaging0026::GetTestStepName()
|
|
3590 |
/**
|
|
3591 |
* @return The test step name.
|
|
3592 |
*/
|
|
3593 |
{
|
|
3594 |
return _L("CCTSYIntegrationTestSmsMessaging0026");
|
|
3595 |
}
|
|
3596 |
|
|
3597 |
|
|
3598 |
|
|
3599 |
CCTSYIntegrationTestSmsMessaging0027::CCTSYIntegrationTestSmsMessaging0027(CEtelSessionMgr& aEtelSessionMgr)
|
|
3600 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
3601 |
/**
|
|
3602 |
* Constructor.
|
|
3603 |
*/
|
|
3604 |
{
|
|
3605 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0027::GetTestStepName());
|
|
3606 |
}
|
|
3607 |
|
|
3608 |
CCTSYIntegrationTestSmsMessaging0027::~CCTSYIntegrationTestSmsMessaging0027()
|
|
3609 |
/**
|
|
3610 |
* Destructor.
|
|
3611 |
*/
|
|
3612 |
{
|
|
3613 |
}
|
|
3614 |
|
|
3615 |
TVerdict CCTSYIntegrationTestSmsMessaging0027::doTestStepL()
|
|
3616 |
/**
|
|
3617 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0027
|
|
3618 |
* @SYMFssID BA/CTSY/SMSM-0027
|
|
3619 |
* @SYMTestCaseDesc Receive a class 3 SMS message
|
|
3620 |
* @SYMTestPriority High
|
|
3621 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
3622 |
* @SYMTestExpectedResults Pass - SMS message is received.
|
|
3623 |
* @SYMTestType CIT
|
|
3624 |
* @SYMTestCaseDependencies live/automatic
|
|
3625 |
*
|
|
3626 |
* Reason for test: Verify message received.
|
|
3627 |
*
|
|
3628 |
* @return - TVerdict code
|
|
3629 |
*/
|
|
3630 |
{
|
|
3631 |
|
|
3632 |
//
|
|
3633 |
// SET UP
|
|
3634 |
//
|
|
3635 |
|
|
3636 |
|
|
3637 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
3638 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
3639 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
3640 |
CHECK_EQUALS_L(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
3641 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
3642 |
CHECK_EQUALS_L(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
3643 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
3644 |
|
|
3645 |
|
|
3646 |
//
|
|
3647 |
// SET UP END
|
|
3648 |
//
|
|
3649 |
|
|
3650 |
StartTest();
|
|
3651 |
|
|
3652 |
//
|
|
3653 |
// TEST START
|
|
3654 |
//
|
|
3655 |
|
|
3656 |
|
|
3657 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3658 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
3659 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
3660 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
3661 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
3662 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
3663 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
3664 |
|
|
3665 |
// Send a class 3 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
3666 |
TBuf8<140> text(_L8("bAA Hello Mobile AAb"));
|
|
3667 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
3668 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
3669 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass3DataCodingScheme,ETrue);
|
|
3670 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
3671 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
3672 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
3673 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
3674 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
3675 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
3676 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
3677 |
|
|
3678 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3679 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
3680 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
3681 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
3682 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
3683 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
3684 |
|
|
3685 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3686 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
3687 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3688 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
3689 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3690 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
3691 |
|
|
3692 |
|
|
3693 |
//
|
|
3694 |
// TEST END
|
|
3695 |
//
|
|
3696 |
|
|
3697 |
StartCleanup();
|
|
3698 |
|
|
3699 |
// Pop:
|
|
3700 |
// sendSmsRequestStatus
|
|
3701 |
// receiveSmsRequestStatus
|
|
3702 |
CleanupStack::PopAndDestroy(2,&receiveSmsRequestStatus);
|
|
3703 |
|
|
3704 |
return TestStepResult();
|
|
3705 |
}
|
|
3706 |
|
|
3707 |
TPtrC CCTSYIntegrationTestSmsMessaging0027::GetTestStepName()
|
|
3708 |
/**
|
|
3709 |
* @return The test step name.
|
|
3710 |
*/
|
|
3711 |
{
|
|
3712 |
return _L("CCTSYIntegrationTestSmsMessaging0027");
|
|
3713 |
}
|
|
3714 |
|
|
3715 |
|
|
3716 |
|
|
3717 |
CCTSYIntegrationTestSmsMessaging0028::CCTSYIntegrationTestSmsMessaging0028(CEtelSessionMgr& aEtelSessionMgr)
|
|
3718 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
3719 |
/**
|
|
3720 |
* Constructor.
|
|
3721 |
*/
|
|
3722 |
{
|
|
3723 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0028::GetTestStepName());
|
|
3724 |
}
|
|
3725 |
|
|
3726 |
CCTSYIntegrationTestSmsMessaging0028::~CCTSYIntegrationTestSmsMessaging0028()
|
|
3727 |
/**
|
|
3728 |
* Destructor.
|
|
3729 |
*/
|
|
3730 |
{
|
|
3731 |
}
|
|
3732 |
|
|
3733 |
TVerdict CCTSYIntegrationTestSmsMessaging0028::doTestStepL()
|
|
3734 |
/**
|
|
3735 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0028
|
|
3736 |
* @SYMFssID BA/CTSY/SMSM-0028
|
|
3737 |
* @SYMTestCaseDesc Receive a class 0 SMS message when the SMS store is full
|
|
3738 |
* @SYMTestPriority High
|
|
3739 |
* @SYMTestActions RMobileSmsMessaging::ReceiveMessage
|
|
3740 |
* @SYMTestExpectedResults Pass - SMS message is received.
|
|
3741 |
* @SYMTestType CIT
|
|
3742 |
* @SYMTestCaseDependencies live/automatic
|
|
3743 |
*
|
|
3744 |
* Reason for test: Verify message received.
|
|
3745 |
*
|
|
3746 |
* @return - TVerdict code
|
|
3747 |
*/
|
|
3748 |
{
|
|
3749 |
|
|
3750 |
//
|
|
3751 |
// SET UP
|
|
3752 |
//
|
|
3753 |
|
|
3754 |
|
|
3755 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
3756 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
3757 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
3758 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
3759 |
CHECK_EQUALS_L(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
3760 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
3761 |
CHECK_EQUALS_L(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
3762 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
3763 |
|
|
3764 |
// Ensure that the SMS store is full
|
|
3765 |
RMobileSmsStore& smsStore = iEtelSessionMgr.GetSmsStoreL(KMainServer,KMainPhone,KMainSmsMessaging,KIccSmsStore);
|
|
3766 |
CHECK_TRUE_L(iSmsStoreTsyTestHelper.EnsureStoreFullL(smsStore),_L("TSmsStoreTsyTestHelper::EnsureStoreFullL returned an error"));
|
|
3767 |
|
|
3768 |
//
|
|
3769 |
// SET UP END
|
|
3770 |
//
|
|
3771 |
|
|
3772 |
StartTest();
|
|
3773 |
|
|
3774 |
//
|
|
3775 |
// TEST START
|
|
3776 |
//
|
|
3777 |
|
|
3778 |
|
|
3779 |
// === Receive a class 0 message when the SMS store is full ===
|
|
3780 |
|
|
3781 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3782 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
3783 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
3784 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
3785 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
3786 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
3787 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
3788 |
|
|
3789 |
// Send a class 0 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
3790 |
TBuf8<140> text1(_L8("BA-CTSY-INT-SMSM-0028.1"));
|
|
3791 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
3792 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
3793 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text1, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass0DataCodingScheme,ETrue);
|
|
3794 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
3795 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
3796 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
3797 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
3798 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
3799 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
3800 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
3801 |
|
|
3802 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3803 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
3804 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
3805 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
3806 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
3807 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
3808 |
|
|
3809 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3810 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
3811 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3812 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
3813 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3814 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
3815 |
|
|
3816 |
|
|
3817 |
//
|
|
3818 |
// TEST END
|
|
3819 |
//
|
|
3820 |
|
|
3821 |
StartCleanup();
|
|
3822 |
|
|
3823 |
// Pop:
|
|
3824 |
// sendSmsRequestStatus
|
|
3825 |
// receiveSmsRequestStatus
|
|
3826 |
CleanupStack::PopAndDestroy(2,&receiveSmsRequestStatus);
|
|
3827 |
|
|
3828 |
return TestStepResult();
|
|
3829 |
}
|
|
3830 |
|
|
3831 |
TPtrC CCTSYIntegrationTestSmsMessaging0028::GetTestStepName()
|
|
3832 |
/**
|
|
3833 |
* @return The test step name.
|
|
3834 |
*/
|
|
3835 |
{
|
|
3836 |
return _L("CCTSYIntegrationTestSmsMessaging0028");
|
|
3837 |
}
|
|
3838 |
|
|
3839 |
|
|
3840 |
|
|
3841 |
CCTSYIntegrationTestSmsMessaging0029::CCTSYIntegrationTestSmsMessaging0029(CEtelSessionMgr& aEtelSessionMgr)
|
|
3842 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
3843 |
/**
|
|
3844 |
* Constructor.
|
|
3845 |
*/
|
|
3846 |
{
|
|
3847 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0029::GetTestStepName());
|
|
3848 |
}
|
|
3849 |
|
|
3850 |
CCTSYIntegrationTestSmsMessaging0029::~CCTSYIntegrationTestSmsMessaging0029()
|
|
3851 |
/**
|
|
3852 |
* Destructor.
|
|
3853 |
*/
|
|
3854 |
{
|
|
3855 |
}
|
|
3856 |
|
|
3857 |
TVerdict CCTSYIntegrationTestSmsMessaging0029::doTestStepL()
|
|
3858 |
/**
|
|
3859 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0029
|
|
3860 |
* @SYMFssID BA/CTSY/SMSM-0029
|
|
3861 |
* @SYMTestCaseDesc Receive class 2 SMS when store is full and resume SMS reception
|
|
3862 |
* @SYMTestPriority High
|
|
3863 |
* @SYMTestActions RMobileSmsMessaging::NackSmsStored, RMobileSmsMessaging::AckSmsStored, RMobileSmsMessaging::ResumeSmsReception, RMobileSmsMessaging::ReceiveMessage
|
|
3864 |
* @SYMTestExpectedResults Pass - Acknowledgements can be sent to the network and SMS reception can be resumed.
|
|
3865 |
* @SYMTestType CIT
|
|
3866 |
* @SYMTestCaseDependencies live/automatic
|
|
3867 |
*
|
|
3868 |
* Reason for test: Verify message received.
|
|
3869 |
*
|
|
3870 |
* @return - TVerdict code
|
|
3871 |
*/
|
|
3872 |
{
|
|
3873 |
|
|
3874 |
//
|
|
3875 |
// SET UP
|
|
3876 |
//
|
|
3877 |
|
|
3878 |
// Ensure that the SMS store is not full
|
|
3879 |
RMobileSmsStore& smsStore = iEtelSessionMgr.GetSmsStoreL(KMainServer,KMainPhone,KMainSmsMessaging,KIccSmsStore);
|
|
3880 |
RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
|
|
3881 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL( KMainServer, KMainPhone, KMainSmsMessaging);
|
|
3882 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1 storeInfo;
|
|
3883 |
TInt clearSpace=iSimTsyTestHelper.EnsureEmptyStoreSpaceL(smsStore,KETelIccSmsStore,storeInfo,phone);
|
|
3884 |
CHECK_TRUE_L(clearSpace>=0,_L("TSimTsyTestHelper::TSimTsyTestHelper::EnsureEmptyStoreSpaceL returned an error"));
|
|
3885 |
|
|
3886 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
3887 |
RMobileSmsMessaging::TMobileSmsReceiveMode receiveMode;
|
|
3888 |
CHECK_EQUALS_L(smsMessaging.GetReceiveMode(receiveMode), KErrNone,
|
|
3889 |
_L("RMobileSmsMessaging::GetReceiveMode returned with an error."));
|
|
3890 |
CHECK_EQUALS_L(receiveMode, RMobileSmsMessaging::EReceiveUnstoredClientAck,
|
|
3891 |
_L("RMobileSmsMessaging::GetReceiveMode returned with incorrect mode."));
|
|
3892 |
iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone);
|
|
3893 |
|
|
3894 |
//
|
|
3895 |
// SET UP END
|
|
3896 |
//
|
|
3897 |
|
|
3898 |
StartTest();
|
|
3899 |
|
|
3900 |
//
|
|
3901 |
// TEST START
|
|
3902 |
//
|
|
3903 |
|
|
3904 |
// === Part 1 - Receive 1 SMS then tell network that memory is full ===
|
|
3905 |
|
|
3906 |
// === Receive a class 2 SMS message ===
|
|
3907 |
|
|
3908 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3909 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
3910 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
3911 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
3912 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
3913 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
3914 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
3915 |
|
|
3916 |
// Send a class 2 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
3917 |
TBuf8<140> text(_L8("first 29"));
|
|
3918 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
3919 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
3920 |
RMobileSmsMessaging::TMobileSmsGsmTpdu pdu = CreateValidSmsMessageL(text, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass2DataCodingScheme,ETrue);
|
|
3921 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
3922 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
3923 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
3924 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
3925 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
3926 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
3927 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
3928 |
|
|
3929 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3930 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
3931 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
3932 |
TUint wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
3933 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
3934 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
3935 |
|
|
3936 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
3937 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
3938 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3939 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
3940 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
3941 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
3942 |
|
|
3943 |
// === Tell the network that this message has been received and decoded ===
|
|
3944 |
|
|
3945 |
// === successfully but now the memory is full ===
|
|
3946 |
|
|
3947 |
// Acknowledge that the SMS has been decoded and stored with RMobileSmsMessaging::AckSmsStored sending the delivery report in aMsgData and indicating store is full with aFull=ETrue
|
|
3948 |
ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10045);
|
|
3949 |
ASSERT_EQUALS(1,0, _L("Test leaving because it will cause TSY crash, remove this when defect is fixed"));
|
|
3950 |
TEST_CHECK_POINT_L(_L("test leaving..."));
|
|
3951 |
TExtEtelRequestStatus ackStatus(smsMessaging, EMobileSmsMessagingAckSmsStored);
|
|
3952 |
CleanupStack::PushL(ackStatus);
|
|
3953 |
RMobileSmsMessaging::TMobileSmsGsmTpdu ackPdu;
|
|
3954 |
ackPdu.SetLength(0);
|
|
3955 |
TUint8 messageTypeIndicator=0x00; //0 deliver and deliver report; 1 submit and submit report; 2 status report and command
|
|
3956 |
TUint8 userDataHeaderIndicator=0x00; //0 no header; 0x40 has header
|
|
3957 |
ackPdu.Append(messageTypeIndicator | userDataHeaderIndicator);
|
|
3958 |
TUint8 tpParameterIndicator=0x00;
|
|
3959 |
ackPdu.Append(tpParameterIndicator);
|
|
3960 |
smsMessaging.AckSmsStored(ackStatus,ackPdu,ETrue );
|
|
3961 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(ackStatus, ETimeVeryLong),KErrNone, _L("RMobilePhone::AckSmsStored timed out"));
|
|
3962 |
ASSERT_EQUALS(ackStatus.Int(), KErrNone, _L("RMobilePhone::AckSmsStored returned an error"));
|
|
3963 |
|
|
3964 |
// === Send a message to the board but check it is not received until ===
|
|
3965 |
// === SMS reception is resumed ===
|
|
3966 |
|
|
3967 |
// Ensure that the SMS store is not full
|
|
3968 |
ASSERT_TRUE(iSimTsyTestHelper.EnsureEmptyStoreSpaceL(smsStore,KETelIccSmsStore,storeInfo,phone)>=0,_L("TSimTsyTestHelper::EnsureEmptyStoreSpaceL returned an error"));
|
|
3969 |
|
|
3970 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
3971 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
3972 |
|
|
3973 |
// Send a class 2 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
3974 |
TBuf8<140> text2(_L8("this is the 2nd 29"));
|
|
3975 |
pdu = CreateValidSmsMessageL(text2, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass2DataCodingScheme,ETrue);
|
|
3976 |
|
|
3977 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
3978 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
3979 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
3980 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
3981 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
3982 |
|
|
3983 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
3984 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
3985 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
3986 |
wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
3987 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
3988 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
3989 |
|
|
3990 |
// Wait for 1 minute
|
|
3991 |
User::After(60*KOneSecond);
|
|
3992 |
|
|
3993 |
// Check RMobileSmsMessaging::ReceiveMessage is still pending
|
|
3994 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(),KRequestPending,_L("RMobileSmsMessaging::ReceiveMessage is not pending"));
|
|
3995 |
|
|
3996 |
// === Resume SMS and check message is received ===
|
|
3997 |
|
|
3998 |
// Resume SMS reception with RMobileSmsMessaging::ResumeSmsReception
|
|
3999 |
TExtEtelRequestStatus resumeReceptionRequestStatus(smsMessaging, EMobileSmsMessagingResumeSmsReception);
|
|
4000 |
CleanupStack::PushL(resumeReceptionRequestStatus);
|
|
4001 |
smsMessaging.ResumeSmsReception(resumeReceptionRequestStatus);
|
|
4002 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeReceptionRequestStatus, ETimeMedium),
|
|
4003 |
KErrNone, _L("RMobileSmsMessaging::ResumeSmsReception timed out."));
|
|
4004 |
ASSERT_EQUALS(resumeReceptionRequestStatus.Int(), KErrNone,
|
|
4005 |
_L("RMobileSmsMessaging::ResumeSmsReception completed with incorrect status"));
|
|
4006 |
|
|
4007 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
4008 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
4009 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
4010 |
DEBUG_PRINTF1(_L("BEFORE WAIT"));
|
|
4011 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
4012 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
4013 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
4014 |
|
|
4015 |
// === Part 2 attempt to receive an SMS but tell the network memory is full. Then resume SMS reception and receive the message again ===
|
|
4016 |
|
|
4017 |
// === Receive an SMS message ===
|
|
4018 |
|
|
4019 |
// Ensure that the SMS store is not full
|
|
4020 |
ASSERT_TRUE(iSimTsyTestHelper.EnsureEmptyStoreSpaceL(smsStore,KETelIccSmsStore,storeInfo,phone)>=0,_L("TSimTsyTestHelper::EnsureEmptyStoreSpaceL returned an error"));
|
|
4021 |
|
|
4022 |
// Call RMobileSmsMessaging::ReceiveMessage to wait for an incoming SMS
|
|
4023 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
4024 |
|
|
4025 |
// Send a class 2 SMS message with RMobileSmsMessaging::SendMessage to the board
|
|
4026 |
TBuf8<140> text3(_L8("and this is the third 29 sms"));
|
|
4027 |
pdu = CreateValidSmsMessageL(text3, sendSmsAttributes,TSmsStoreTsyTestHelper::EClass2DataCodingScheme,ETrue);
|
|
4028 |
smsMessaging.SendMessage(sendSmsRequestStatus, pdu, sendSmsAttributesPckg);
|
|
4029 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
4030 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
4031 |
ASSERT_EQUALS(sendSmsRequestStatus.Int(), KErrNone,
|
|
4032 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
4033 |
|
|
4034 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
4035 |
ASSERT_TRUE(sendSmsAttributes.iSubmitReport.Length() > 0,
|
|
4036 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1.iSubmitReport has zero length."));
|
|
4037 |
wantedBits = RMobileSmsMessaging::KGsmSubmitReport;
|
|
4038 |
ASSERT_BITS_SET(sendSmsAttributes.iFlags,wantedBits,KNoUnwantedBits,
|
|
4039 |
_L("RMobileSmsMessaging::TMobileSmsSendAttributesV1 has no submit report in iFlags."));
|
|
4040 |
|
|
4041 |
// Check RMobileSmsMessaging::ReceiveMessage is no longer pending
|
|
4042 |
ASSERT_TRUE(receiveSmsRequestStatus.Int()!=KRequestPending,_L("RMobileSmsMessaging::ReceiveMessage still pending"));
|
|
4043 |
|
|
4044 |
// === Send negative acknowledgement telling network that memory is full ===
|
|
4045 |
|
|
4046 |
// Return a negative acknowledgment with RMobileSmsMessaging::NackSmsStored indicating storage is full
|
|
4047 |
TExtEtelRequestStatus nackStatus(smsMessaging, EMobileSmsMessagingNackSmsStored);
|
|
4048 |
CleanupStack::PushL(nackStatus);
|
|
4049 |
RMobileSmsMessaging::TMobileSmsGsmTpdu nackPdu;
|
|
4050 |
nackPdu.SetLength(0);
|
|
4051 |
messageTypeIndicator=0x00; //0 deliver and deliver report; 1 submit and submit report; 2 status report and command
|
|
4052 |
userDataHeaderIndicator=0x00; //0 no header; 0x40 has header
|
|
4053 |
nackPdu.Append(messageTypeIndicator | userDataHeaderIndicator);
|
|
4054 |
TUint8 failureCause=0xD0; //SIM SMS storage full
|
|
4055 |
nackPdu.Append(failureCause);
|
|
4056 |
tpParameterIndicator=0x00;
|
|
4057 |
nackPdu.Append(tpParameterIndicator);
|
|
4058 |
smsMessaging.NackSmsStored(nackStatus,nackPdu,KErrGsmSMSSimSMSStorageFull);
|
|
4059 |
|
|
4060 |
// Check RMobileSmsMessaging::ReceiveMessage is still pending
|
|
4061 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(),KRequestPending,_L("RMobileSmsMessaging::ReceiveMessage is not pending"));
|
|
4062 |
|
|
4063 |
// === Resume SMS and check message is received ===
|
|
4064 |
|
|
4065 |
// Resume SMS reception with RMobileSmsMessaging::ResumeSmsReception
|
|
4066 |
smsMessaging.ResumeSmsReception(resumeReceptionRequestStatus);
|
|
4067 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeReceptionRequestStatus, ETimeMedium),
|
|
4068 |
KErrNone, _L("RMobileSmsMessaging::ResumeSmsReception timed out."));
|
|
4069 |
ASSERT_EQUALS(resumeReceptionRequestStatus.Int(), KErrNone,
|
|
4070 |
_L("RMobileSmsMessaging::ResumeSmsReception completed with incorrect status"));
|
|
4071 |
|
|
4072 |
// Check RMobileSmsMessaging::ReceiveMessage completes with the correct message data in aMsgData
|
|
4073 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
4074 |
KErrNone, _L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
4075 |
ASSERT_EQUALS(receiveSmsRequestStatus.Int(), KErrNone,
|
|
4076 |
_L("RMobileSmsMessaging::ReceiveMessage returned with error."));
|
|
4077 |
ASSERT_TRUE(ComparePDUs(gsmMsg,pdu),_L("RMobileSmsMessaging::ReceiveMessage return wrong message"));
|
|
4078 |
|
|
4079 |
|
|
4080 |
|
|
4081 |
//
|
|
4082 |
// TEST END
|
|
4083 |
//
|
|
4084 |
|
|
4085 |
StartCleanup();
|
|
4086 |
|
|
4087 |
// Pop:
|
|
4088 |
// nackStatus
|
|
4089 |
// resumeReceptionRequestStatus
|
|
4090 |
// ackStatus
|
|
4091 |
// sendSmsRequestStatus
|
|
4092 |
// receiveSmsRequestStatus
|
|
4093 |
CleanupStack::PopAndDestroy(5,&receiveSmsRequestStatus);
|
|
4094 |
|
|
4095 |
return TestStepResult();
|
|
4096 |
}
|
|
4097 |
|
|
4098 |
TPtrC CCTSYIntegrationTestSmsMessaging0029::GetTestStepName()
|
|
4099 |
/**
|
|
4100 |
* @return The test step name.
|
|
4101 |
*/
|
|
4102 |
{
|
|
4103 |
return _L("CCTSYIntegrationTestSmsMessaging0029");
|
|
4104 |
}
|
|
4105 |
|
|
4106 |
|
|
4107 |
|
|
4108 |
CCTSYIntegrationTestSmsMessaging0030::CCTSYIntegrationTestSmsMessaging0030(CEtelSessionMgr& aEtelSessionMgr)
|
|
4109 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
4110 |
/**
|
|
4111 |
* Constructor.
|
|
4112 |
*/
|
|
4113 |
{
|
|
4114 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0030::GetTestStepName());
|
|
4115 |
}
|
|
4116 |
|
|
4117 |
CCTSYIntegrationTestSmsMessaging0030::~CCTSYIntegrationTestSmsMessaging0030()
|
|
4118 |
/**
|
|
4119 |
* Destructor.
|
|
4120 |
*/
|
|
4121 |
{
|
|
4122 |
}
|
|
4123 |
|
|
4124 |
TVerdict CCTSYIntegrationTestSmsMessaging0030::doTestStepL()
|
|
4125 |
/**
|
|
4126 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0030
|
|
4127 |
* @SYMFssID BA/CTSY/SMSM-0030
|
|
4128 |
* @SYMTestCaseDesc Send an SMS message without FDN check
|
|
4129 |
* @SYMTestPriority High
|
|
4130 |
* @SYMTestActions
|
|
4131 |
* @SYMTestExpectedResults Pass - Message sent.
|
|
4132 |
* @SYMTestType CIT
|
|
4133 |
* @SYMTestCaseDependencies live/automatic
|
|
4134 |
*
|
|
4135 |
* Reason for test: Verify message received.
|
|
4136 |
*
|
|
4137 |
* @return - TVerdict code
|
|
4138 |
*/
|
|
4139 |
{
|
|
4140 |
|
|
4141 |
//
|
|
4142 |
// SET UP
|
|
4143 |
//
|
|
4144 |
|
|
4145 |
|
|
4146 |
// Ensure that RMobileSmsMessaging::GetReceiveMode returns aReceiveMode = EReceiveUnstoredClientAck
|
|
4147 |
|
|
4148 |
|
|
4149 |
//
|
|
4150 |
// SET UP END
|
|
4151 |
//
|
|
4152 |
|
|
4153 |
StartTest();
|
|
4154 |
|
|
4155 |
//
|
|
4156 |
// TEST START
|
|
4157 |
//
|
|
4158 |
|
|
4159 |
|
|
4160 |
// Send an SMS message using RMobileSmsMessaging::SendMessageNoFdnCheck
|
|
4161 |
|
|
4162 |
// Check no error is returned in aMsgAttributes.iSubmitReport
|
|
4163 |
|
|
4164 |
|
|
4165 |
//
|
|
4166 |
// TEST END
|
|
4167 |
//
|
|
4168 |
|
|
4169 |
StartCleanup();
|
|
4170 |
|
|
4171 |
// Put any required test clean up here, then remove this comment
|
|
4172 |
|
|
4173 |
return TestStepResult();
|
|
4174 |
}
|
|
4175 |
|
|
4176 |
TPtrC CCTSYIntegrationTestSmsMessaging0030::GetTestStepName()
|
|
4177 |
/**
|
|
4178 |
* @return The test step name.
|
|
4179 |
*/
|
|
4180 |
{
|
|
4181 |
return _L("CCTSYIntegrationTestSmsMessaging0030");
|
|
4182 |
}
|
|
4183 |
|
|
4184 |
|
|
4185 |
|
|
4186 |
CCTSYIntegrationTestSmsMessaging0031::CCTSYIntegrationTestSmsMessaging0031(CEtelSessionMgr& aEtelSessionMgr)
|
|
4187 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
4188 |
/**
|
|
4189 |
* Constructor.
|
|
4190 |
*/
|
|
4191 |
{
|
|
4192 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0031::GetTestStepName());
|
|
4193 |
}
|
|
4194 |
|
|
4195 |
CCTSYIntegrationTestSmsMessaging0031::~CCTSYIntegrationTestSmsMessaging0031()
|
|
4196 |
/**
|
|
4197 |
* Destructor.
|
|
4198 |
*/
|
|
4199 |
{
|
|
4200 |
}
|
|
4201 |
|
|
4202 |
TVerdict CCTSYIntegrationTestSmsMessaging0031::doTestStepL()
|
|
4203 |
/**
|
|
4204 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0031
|
|
4205 |
* @SYMFssID BA/CTSY/SMSM-0031
|
|
4206 |
* @SYMTestCaseDesc Get SMS messaging caps.
|
|
4207 |
* @SYMTestPriority High
|
|
4208 |
* @SYMTestActions
|
|
4209 |
* @SYMTestExpectedResults Pass - Correct caps returned.
|
|
4210 |
* @SYMTestType CIT
|
|
4211 |
* @SYMTestCaseDependencies live/automatic
|
|
4212 |
*
|
|
4213 |
* Reason for test: Verify caps returned are correct.
|
|
4214 |
*
|
|
4215 |
* @return - TVerdict code
|
|
4216 |
*/
|
|
4217 |
{
|
|
4218 |
|
|
4219 |
//
|
|
4220 |
// SET UP
|
|
4221 |
//
|
|
4222 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
4223 |
|
|
4224 |
|
|
4225 |
//
|
|
4226 |
// SET UP END
|
|
4227 |
//
|
|
4228 |
|
|
4229 |
StartTest();
|
|
4230 |
|
|
4231 |
//
|
|
4232 |
// TEST START
|
|
4233 |
//
|
|
4234 |
|
|
4235 |
// Check RMobileSmsMessaging::GetCaps returns aCaps.iSmsMode caps in set of RMobileSmsMessaging::KCapsGsmSms
|
|
4236 |
RMobileSmsMessaging::TMobileSmsCapsV1 smsCaps;
|
|
4237 |
RMobileSmsMessaging::TMobileSmsCapsV1Pckg smsCapsPkg(smsCaps);
|
|
4238 |
ASSERT_EQUALS(smsMessaging.GetCaps(smsCapsPkg), KErrNone,
|
|
4239 |
_L("RMobileSmsMessaging::GetCaps returned an error."));
|
|
4240 |
TUint32 expectedMinCaps = RMobileSmsMessaging::KCapsGsmSms;
|
|
4241 |
ASSERT_BITS_SET(smsCaps.iSmsMode, expectedMinCaps, KNoUnwantedBits,
|
|
4242 |
_L("RMobileSmsMessaging::GetCaps miniumum capabilites not found:RMobileSmsMessaging::KCapsGsmSms."));
|
|
4243 |
|
|
4244 |
// Check RMobileSmsMessaging::GetCaps returns aCaps.iSmsControl caps in set of RMobileSmsMessaging::KCapsReceiveUnstoredClientAck | RMobileSmsMessaging::KCapsSendWithAck | RMobileSmsMessaging::KCapsGetSmspList | RMobileSmsMessaging::KCapsSetSmspList
|
|
4245 |
expectedMinCaps = RMobileSmsMessaging::KCapsReceiveUnstoredClientAck |
|
|
4246 |
RMobileSmsMessaging::KCapsSendWithAck |
|
|
4247 |
RMobileSmsMessaging::KCapsGetSmspList |
|
|
4248 |
RMobileSmsMessaging::KCapsSetSmspList;
|
|
4249 |
ASSERT_BITS_SET(smsCaps.iSmsControl, expectedMinCaps, KNoUnwantedBits,
|
|
4250 |
_L("RMobileSmsMessaging::GetCaps returned with incorrect caps."));
|
|
4251 |
|
|
4252 |
//
|
|
4253 |
// TEST END
|
|
4254 |
//
|
|
4255 |
|
|
4256 |
StartCleanup();
|
|
4257 |
|
|
4258 |
return TestStepResult();
|
|
4259 |
}
|
|
4260 |
|
|
4261 |
TPtrC CCTSYIntegrationTestSmsMessaging0031::GetTestStepName()
|
|
4262 |
/**
|
|
4263 |
* @return The test step name.
|
|
4264 |
*/
|
|
4265 |
{
|
|
4266 |
return _L("CCTSYIntegrationTestSmsMessaging0031");
|
|
4267 |
}
|
|
4268 |
|
|
4269 |
|
|
4270 |
|
|
4271 |
CCTSYIntegrationTestSmsMessaging0032::CCTSYIntegrationTestSmsMessaging0032(CEtelSessionMgr& aEtelSessionMgr)
|
|
4272 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
4273 |
/**
|
|
4274 |
* Constructor.
|
|
4275 |
*/
|
|
4276 |
{
|
|
4277 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0032::GetTestStepName());
|
|
4278 |
}
|
|
4279 |
|
|
4280 |
CCTSYIntegrationTestSmsMessaging0032::~CCTSYIntegrationTestSmsMessaging0032()
|
|
4281 |
/**
|
|
4282 |
* Destructor.
|
|
4283 |
*/
|
|
4284 |
{
|
|
4285 |
}
|
|
4286 |
|
|
4287 |
TVerdict CCTSYIntegrationTestSmsMessaging0032::doTestStepL()
|
|
4288 |
/**
|
|
4289 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0032
|
|
4290 |
* @SYMFssID BA/CTSY/SMSM-0032
|
|
4291 |
* @SYMTestCaseDesc Cancel receiving an SMS message.
|
|
4292 |
* @SYMTestPriority High
|
|
4293 |
* @SYMTestActions
|
|
4294 |
* @SYMTestExpectedResults Pass -
|
|
4295 |
* @SYMTestType CIT
|
|
4296 |
* @SYMTestCaseDependencies live/automatic
|
|
4297 |
*
|
|
4298 |
* Reason for test: Verify request is cancelled.
|
|
4299 |
*
|
|
4300 |
* @return - TVerdict code
|
|
4301 |
*/
|
|
4302 |
{
|
|
4303 |
|
|
4304 |
//
|
|
4305 |
// SET UP
|
|
4306 |
//
|
|
4307 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
4308 |
|
|
4309 |
|
|
4310 |
//
|
|
4311 |
// SET UP END
|
|
4312 |
//
|
|
4313 |
|
|
4314 |
StartTest();
|
|
4315 |
|
|
4316 |
//
|
|
4317 |
// TEST START
|
|
4318 |
//
|
|
4319 |
|
|
4320 |
|
|
4321 |
// Request to receive an SMS message with RMobileSmsMessaging::ReceiveMessage
|
|
4322 |
TExtEtelRequestStatus receiveSmsRequestStatus(smsMessaging,EMobileSmsMessagingReceiveMessage);
|
|
4323 |
CleanupStack::PushL(receiveSmsRequestStatus);
|
|
4324 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 receivedSmsAttributes;
|
|
4325 |
RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg receivedSmsAttributesPckg(receivedSmsAttributes);
|
|
4326 |
RMobileSmsMessaging::TMobileSmsGsmTpdu gsmMsg;
|
|
4327 |
smsMessaging.ReceiveMessage(receiveSmsRequestStatus, gsmMsg, receivedSmsAttributesPckg);
|
|
4328 |
|
|
4329 |
// Cancel the request with CancelAsyncRequest( EMobileSmsMessagingReceiveMessage )
|
|
4330 |
smsMessaging.CancelAsyncRequest(EMobileSmsMessagingReceiveMessage);
|
|
4331 |
|
|
4332 |
// Check RMobileSmsMessaging::ReceiveMessage completes with KErrCancel
|
|
4333 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(receiveSmsRequestStatus, ETimeVeryLong),
|
|
4334 |
KErrNone, _L("RMobilePhone::CancelAsyncRequest returned with error."));
|
|
4335 |
ASSERT_TRUE(receiveSmsRequestStatus.Int() == KErrNone || receiveSmsRequestStatus.Int() == KErrCancel,
|
|
4336 |
_L("RMobilePhone::CancelAsyncRequest returned with error."));
|
|
4337 |
|
|
4338 |
|
|
4339 |
|
|
4340 |
//
|
|
4341 |
// TEST END
|
|
4342 |
//
|
|
4343 |
|
|
4344 |
StartCleanup();
|
|
4345 |
|
|
4346 |
CleanupStack::PopAndDestroy(1);
|
|
4347 |
|
|
4348 |
return TestStepResult();
|
|
4349 |
}
|
|
4350 |
|
|
4351 |
TPtrC CCTSYIntegrationTestSmsMessaging0032::GetTestStepName()
|
|
4352 |
/**
|
|
4353 |
* @return The test step name.
|
|
4354 |
*/
|
|
4355 |
{
|
|
4356 |
return _L("CCTSYIntegrationTestSmsMessaging0032");
|
|
4357 |
}
|
|
4358 |
|
|
4359 |
|
|
4360 |
|
|
4361 |
CCTSYIntegrationTestSmsMessaging0033::CCTSYIntegrationTestSmsMessaging0033(CEtelSessionMgr& aEtelSessionMgr)
|
|
4362 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
4363 |
/**
|
|
4364 |
* Constructor.
|
|
4365 |
*/
|
|
4366 |
{
|
|
4367 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0033::GetTestStepName());
|
|
4368 |
}
|
|
4369 |
|
|
4370 |
CCTSYIntegrationTestSmsMessaging0033::~CCTSYIntegrationTestSmsMessaging0033()
|
|
4371 |
/**
|
|
4372 |
* Destructor.
|
|
4373 |
*/
|
|
4374 |
{
|
|
4375 |
}
|
|
4376 |
|
|
4377 |
TVerdict CCTSYIntegrationTestSmsMessaging0033::doTestStepL()
|
|
4378 |
/**
|
|
4379 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0033
|
|
4380 |
* @SYMFssID BA/CTSY/SMSM-0033
|
|
4381 |
* @SYMTestCaseDesc Attempt to send an SMS message that is too long.
|
|
4382 |
* @SYMTestPriority High
|
|
4383 |
* @SYMTestActions
|
|
4384 |
* @SYMTestExpectedResults Pass - Error returned.
|
|
4385 |
* @SYMTestType CIT
|
|
4386 |
* @SYMTestCaseDependencies live/automatic
|
|
4387 |
*
|
|
4388 |
* Reason for test: Verify error is returned.
|
|
4389 |
*
|
|
4390 |
* @return - TVerdict code
|
|
4391 |
*
|
|
4392 |
* $CTSYProblem - The board resets when passing a messsage to LTSY which is too long. No checking is done by the CTSY.
|
|
4393 |
* No error is returned from LTSY. The board just reboots.
|
|
4394 |
*
|
|
4395 |
*
|
|
4396 |
*/
|
|
4397 |
{
|
|
4398 |
|
|
4399 |
//
|
|
4400 |
// SET UP
|
|
4401 |
//
|
|
4402 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
4403 |
|
|
4404 |
// Ensure SMS bearer is RMobileSmsMessaging::ESmsBearerCircuitPreferred
|
|
4405 |
RMobileSmsMessaging::TMobileSmsBearer bearer;
|
|
4406 |
TExtEtelRequestStatus setBearerStatusRequest(smsMessaging, EMobileSmsMessagingSetMoSmsBearer);
|
|
4407 |
CleanupStack::PushL(setBearerStatusRequest);
|
|
4408 |
smsMessaging.SetMoSmsBearer(setBearerStatusRequest, RMobileSmsMessaging::ESmsBearerCircuitPreferred);
|
|
4409 |
CHECK_EQUALS_L(WaitForRequestWithTimeOut(setBearerStatusRequest, ETimeLong), KErrNone,
|
|
4410 |
_L("RMobileSmsMessaging::SetMoSmsBearer timed-out"));
|
|
4411 |
|
|
4412 |
// Check RMobileSmsMessaging::GetMoSmsBearer returns KErrNotSupported
|
|
4413 |
TInt error = smsMessaging.GetMoSmsBearer(bearer);
|
|
4414 |
CHECK_EQUALS_L(error, KErrNotSupported,_L("RMobileSmsMessaging::GetMoSmsBearer returned with error."));
|
|
4415 |
|
|
4416 |
|
|
4417 |
|
|
4418 |
//
|
|
4419 |
// SET UP END
|
|
4420 |
//
|
|
4421 |
|
|
4422 |
StartTest();
|
|
4423 |
|
|
4424 |
//
|
|
4425 |
// TEST START
|
|
4426 |
//
|
|
4427 |
|
|
4428 |
|
|
4429 |
// Attempt to send an SMS message that is 206 characters with RMobileSmsMessaging::SendMessage
|
|
4430 |
TExtEtelRequestStatus sendSmsRequestStatus(smsMessaging, EMobileSmsMessagingSendMessage);
|
|
4431 |
CleanupStack::PushL(sendSmsRequestStatus);
|
|
4432 |
|
|
4433 |
TBuf8<206> text(_L8("This is a 206 character message. It is going to fill up the space with XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"));
|
|
4434 |
|
|
4435 |
//Read the destination and Service Centre numbers from ini file
|
|
4436 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 sendSmsAttributes;
|
|
4437 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg sendSmsAttributesPckg(sendSmsAttributes);
|
|
4438 |
GetSmsSendAttributesL(sendSmsAttributes);
|
|
4439 |
|
|
4440 |
// Check error is returned.
|
|
4441 |
// Due to LTSY crashing when a message of this length is passed, the rest of
|
|
4442 |
// this test case cannot be executed. If the LTSY is fixed, execute the code below.
|
|
4443 |
/*
|
|
4444 |
smsMessaging.SendMessage(sendSmsRequestStatus, text, sendSmsAttributesPckg);
|
|
4445 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(sendSmsRequestStatus, ETimeMedium),
|
|
4446 |
KErrNone, _L("RMobileSmsMessaging::SendMessage timed out."));
|
|
4447 |
ASSERT_TRUE(sendSmsRequestStatus.Int() != KErrNone,
|
|
4448 |
_L("RMobileSmsMessaging::SendMessage completed with incorrect status"));
|
|
4449 |
*/
|
|
4450 |
|
|
4451 |
//
|
|
4452 |
// TEST END
|
|
4453 |
//
|
|
4454 |
|
|
4455 |
StartCleanup();
|
|
4456 |
|
|
4457 |
/* setBearerStatusRequest
|
|
4458 |
sendSmsRequestStatus */
|
|
4459 |
CleanupStack::PopAndDestroy(2,&setBearerStatusRequest);
|
|
4460 |
|
|
4461 |
return TestStepResult();
|
|
4462 |
}
|
|
4463 |
|
|
4464 |
TPtrC CCTSYIntegrationTestSmsMessaging0033::GetTestStepName()
|
|
4465 |
/**
|
|
4466 |
* @return The test step name.
|
|
4467 |
*/
|
|
4468 |
{
|
|
4469 |
return _L("CCTSYIntegrationTestSmsMessaging0033");
|
|
4470 |
}
|
|
4471 |
|
|
4472 |
|
|
4473 |
|
|
4474 |
CCTSYIntegrationTestSmsMessaging0034::CCTSYIntegrationTestSmsMessaging0034(CEtelSessionMgr& aEtelSessionMgr)
|
|
4475 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
4476 |
/**
|
|
4477 |
* Constructor.
|
|
4478 |
*/
|
|
4479 |
{
|
|
4480 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0034::GetTestStepName());
|
|
4481 |
}
|
|
4482 |
|
|
4483 |
CCTSYIntegrationTestSmsMessaging0034::~CCTSYIntegrationTestSmsMessaging0034()
|
|
4484 |
/**
|
|
4485 |
* Destructor.
|
|
4486 |
*/
|
|
4487 |
{
|
|
4488 |
}
|
|
4489 |
|
|
4490 |
TVerdict CCTSYIntegrationTestSmsMessaging0034::doTestStepL()
|
|
4491 |
/**
|
|
4492 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0034
|
|
4493 |
* @SYMFssID BA/CTSY/SMSM-0034
|
|
4494 |
* @SYMTestCaseDesc Resume SMS Reception
|
|
4495 |
* @SYMTestPriority High
|
|
4496 |
* @SYMTestActions
|
|
4497 |
* @SYMTestExpectedResults Pass - KErrNone is returned.
|
|
4498 |
* @SYMTestType CIT
|
|
4499 |
* @SYMTestCaseDependencies live/automatic
|
|
4500 |
*
|
|
4501 |
* Reason for test: Verify KErrNone is returned
|
|
4502 |
*
|
|
4503 |
* @return - TVerdict code
|
|
4504 |
*/
|
|
4505 |
{
|
|
4506 |
|
|
4507 |
//
|
|
4508 |
// SET UP
|
|
4509 |
//
|
|
4510 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
4511 |
|
|
4512 |
|
|
4513 |
//
|
|
4514 |
// SET UP END
|
|
4515 |
//
|
|
4516 |
|
|
4517 |
StartTest();
|
|
4518 |
|
|
4519 |
//
|
|
4520 |
// TEST START
|
|
4521 |
//
|
|
4522 |
|
|
4523 |
|
|
4524 |
// Resume SMS reception with RMobileSmsMessaging::ResumeSmsReception
|
|
4525 |
TExtEtelRequestStatus resumeReceptionRequestStatus(smsMessaging, EMobileSmsMessagingResumeSmsReception);
|
|
4526 |
CleanupStack::PushL(resumeReceptionRequestStatus);
|
|
4527 |
smsMessaging.ResumeSmsReception(resumeReceptionRequestStatus);
|
|
4528 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeReceptionRequestStatus, ETimeMedium),
|
|
4529 |
KErrNone, _L("RMobileSmsMessaging::ResumeSmsReception timed out."));
|
|
4530 |
ASSERT_EQUALS(resumeReceptionRequestStatus.Int(), KErrNone,
|
|
4531 |
_L("RMobileSmsMessaging::ResumeSmsReception completed with incorrect status"));
|
|
4532 |
|
|
4533 |
|
|
4534 |
//
|
|
4535 |
// TEST END
|
|
4536 |
//
|
|
4537 |
|
|
4538 |
StartCleanup();
|
|
4539 |
|
|
4540 |
// resumeReceptionRequestStatus
|
|
4541 |
CleanupStack::PopAndDestroy(1);
|
|
4542 |
|
|
4543 |
return TestStepResult();
|
|
4544 |
}
|
|
4545 |
|
|
4546 |
TPtrC CCTSYIntegrationTestSmsMessaging0034::GetTestStepName()
|
|
4547 |
/**
|
|
4548 |
* @return The test step name.
|
|
4549 |
*/
|
|
4550 |
{
|
|
4551 |
return _L("CCTSYIntegrationTestSmsMessaging0034");
|
|
4552 |
}
|
|
4553 |
|
|
4554 |
|
|
4555 |
|
|
4556 |
CCTSYIntegrationTestSmsMessaging0035::CCTSYIntegrationTestSmsMessaging0035(CEtelSessionMgr& aEtelSessionMgr)
|
|
4557 |
: CCTSYIntegrationTestSmsMessagingBase(aEtelSessionMgr)
|
|
4558 |
/**
|
|
4559 |
* Constructor.
|
|
4560 |
*/
|
|
4561 |
{
|
|
4562 |
SetTestStepName(CCTSYIntegrationTestSmsMessaging0035::GetTestStepName());
|
|
4563 |
}
|
|
4564 |
|
|
4565 |
CCTSYIntegrationTestSmsMessaging0035::~CCTSYIntegrationTestSmsMessaging0035()
|
|
4566 |
/**
|
|
4567 |
* Destructor.
|
|
4568 |
*/
|
|
4569 |
{
|
|
4570 |
}
|
|
4571 |
|
|
4572 |
TVerdict CCTSYIntegrationTestSmsMessaging0035::doTestStepL()
|
|
4573 |
/**
|
|
4574 |
* @SYMTestCaseID BA-CTSY-INT-SMSM-0035
|
|
4575 |
* @SYMFssID BA/CTSY/SMSM-0035
|
|
4576 |
* @SYMTestCaseDesc Cancel resume SMS reception
|
|
4577 |
* @SYMTestPriority High
|
|
4578 |
* @SYMTestActions
|
|
4579 |
* @SYMTestExpectedResults Pass - KErrNone is returned.
|
|
4580 |
* @SYMTestType CIT
|
|
4581 |
* @SYMTestCaseDependencies live/automatic
|
|
4582 |
*
|
|
4583 |
* Reason for test: Verify KErrNone or KErrCancel returned
|
|
4584 |
*
|
|
4585 |
* @return - TVerdict code
|
|
4586 |
*/
|
|
4587 |
{
|
|
4588 |
|
|
4589 |
//
|
|
4590 |
// SET UP
|
|
4591 |
//
|
|
4592 |
RMobileSmsMessaging &smsMessaging = iEtelSessionMgr.GetSmsMessagingL(KMainServer, KMainPhone, KMainSmsMessaging);
|
|
4593 |
|
|
4594 |
|
|
4595 |
//
|
|
4596 |
// SET UP END
|
|
4597 |
//
|
|
4598 |
|
|
4599 |
StartTest();
|
|
4600 |
|
|
4601 |
//
|
|
4602 |
// TEST START
|
|
4603 |
//
|
|
4604 |
|
|
4605 |
|
|
4606 |
// Resume SMS reception with RMobileSmsMessaging::ResumeSmsReception
|
|
4607 |
TExtEtelRequestStatus resumeReceiveSmsRequestStatus(smsMessaging, EMobileSmsMessagingResumeSmsReception);
|
|
4608 |
CleanupStack::PushL(resumeReceiveSmsRequestStatus);
|
|
4609 |
smsMessaging.ResumeSmsReception(resumeReceiveSmsRequestStatus);
|
|
4610 |
|
|
4611 |
// Cancel request with RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingResumeSmsReception)
|
|
4612 |
smsMessaging.CancelAsyncRequest(EMobileSmsMessagingResumeSmsReception);
|
|
4613 |
ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeReceiveSmsRequestStatus, ETimeMedium),
|
|
4614 |
KErrNone, _L("RMobileSmsMessaging::ResumeSmsReception timed out."));
|
|
4615 |
ASSERT_TRUE(resumeReceiveSmsRequestStatus.Int() == KErrNone || resumeReceiveSmsRequestStatus.Int() == KErrCancel,
|
|
4616 |
_L("RMobileSmsMessaging::ResumeSmsReception completed with incorrect status"));
|
|
4617 |
|
|
4618 |
|
|
4619 |
|
|
4620 |
//
|
|
4621 |
// TEST END
|
|
4622 |
//
|
|
4623 |
|
|
4624 |
StartCleanup();
|
|
4625 |
|
|
4626 |
// resumeReceiveSmsRequestStatus
|
|
4627 |
CleanupStack::PopAndDestroy(1);
|
|
4628 |
|
|
4629 |
return TestStepResult();
|
|
4630 |
}
|
|
4631 |
|
|
4632 |
TPtrC CCTSYIntegrationTestSmsMessaging0035::GetTestStepName()
|
|
4633 |
/**
|
|
4634 |
* @return The test step name.
|
|
4635 |
*/
|
|
4636 |
{
|
|
4637 |
return _L("CCTSYIntegrationTestSmsMessaging0035");
|
|
4638 |
}
|