telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsysupplementaryservicesfunegative.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file The TEFUnit test suite for CallControl in the Common TSY.
       
    20 */
       
    21 
       
    22 #include <etel.h>
       
    23 #include <etelmm.h>
       
    24 #include <et_clsvr.h>
       
    25 #include <ctsy/mmtsy_names.h>
       
    26 #include <ctsy/serviceapi/mmtsy_ipcdefs.h>
       
    27 #include <test/tmockltsydata.h>
       
    28 #include <ctsy/serviceapi/gsmerror.h>
       
    29 
       
    30 #include <ctsy/ltsy/mltsydispatchsupplementaryservicesinterface.h>
       
    31 #include "config.h"
       
    32 #include "cctsyactiveretriever.h"
       
    33 #include <mmretrieve.h>
       
    34 
       
    35 #include "cctsysupplementaryservicesfunegative.h"
       
    36 
       
    37 CTestSuite* CCTsySupplementaryServicesFUNegative::CreateSuiteL(const TDesC& aName)
       
    38 	{
       
    39 	SUB_SUITE;
       
    40 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0001L);
       
    41 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0002L);
       
    42 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0003L);
       
    43 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0004L);	
       
    44 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0005L);
       
    45 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0006L);
       
    46 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0007L);
       
    47 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0008L);
       
    48 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0009L);
       
    49 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0010L);
       
    50 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0011L);
       
    51 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0012L);
       
    52 	ADD_TEST_STEP_ISO_CPP(CCTsySupplementaryServicesFUNegative, TestUnit0013L);
       
    53 	END_SUITE;
       
    54 	}
       
    55 
       
    56 //
       
    57 // 'Negative' unit tests
       
    58 //
       
    59 
       
    60 /**
       
    61 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0001
       
    62 @SYMComponent telephony_ctsy
       
    63 @SYMTestCaseDesc Test returned value if EMobilePhoneSendNetworkServiceRequestNoFdnCheck is not supported by LTSY
       
    64 @SYMTestPriority High
       
    65 @SYMTestActions Invokes RMobilePhone::SendNetworkServiceRequestNoFdnCheck()
       
    66 @SYMTestExpectedResults Pass
       
    67 @SYMTestType UT
       
    68 */
       
    69 void CCTsySupplementaryServicesFUNegative::TestUnit0001L()
       
    70 	{
       
    71 	TConfig config;
       
    72 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSendNetworkServiceRequestNoFdnCheck::KLtsyDispatchSupplementaryServicesSendNetworkServiceRequestNoFdnCheckApiId, EFalse);
       
    73 	
       
    74 	OpenEtelServerL(EUseExtendedError);
       
    75 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
    76 	OpenPhoneL();
       
    77 	
       
    78     TRequestStatus requestStatus;
       
    79 	_LIT(KMsg2,"SendNetworkServiceRequest1.2");
       
    80 	TName expServiceStringNoFDN(KMsg2);
       
    81     	
       
    82 	iPhone.SendNetworkServiceRequestNoFdnCheck(requestStatus, expServiceStringNoFDN);
       
    83     User::WaitForRequest(requestStatus);
       
    84     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
    85 
       
    86     AssertMockLtsyStatusL();
       
    87 	config.Reset();
       
    88 	CleanupStack::PopAndDestroy(this); // this
       
    89 	}
       
    90 
       
    91 /**
       
    92 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0002
       
    93 @SYMComponent telephony_ctsy
       
    94 @SYMTestCaseDesc Test returned value if EMobilePhoneGetWaitingStatusPhase1 is not supported by LTSY
       
    95 @SYMTestPriority High
       
    96 @SYMTestActions Invokes CRetrieveMobilePhoneCWList::Start()
       
    97 @SYMTestExpectedResults Pass
       
    98 @SYMTestType UT
       
    99 */
       
   100 void CCTsySupplementaryServicesFUNegative::TestUnit0002L()
       
   101 	{
       
   102 	TConfig config;
       
   103 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesGetCallWaitingStatus::KLtsyDispatchSupplementaryServicesGetCallWaitingStatusApiId, EFalse);
       
   104 	
       
   105 	OpenEtelServerL(EUseExtendedError);
       
   106 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   107 	OpenPhoneL();
       
   108 
       
   109 	CFilteringActiveScheduler scheduler;
       
   110 	CActiveScheduler::Install(&scheduler);
       
   111 
       
   112 	CRetrieveMobilePhoneCWList* asyncRetrieveMobilePhoneCWList = CRetrieveMobilePhoneCWList::NewL(iPhone);    
       
   113 	CleanupStack::PushL(asyncRetrieveMobilePhoneCWList);
       
   114 
       
   115 	CActiveRetriever::ResetRequestsNumber();
       
   116 	CActiveRetriever* activeRetriever = CActiveRetriever::NewL(*asyncRetrieveMobilePhoneCWList);
       
   117 	CleanupStack::PushL(activeRetriever);
       
   118 	scheduler.AddRetrieverL(*activeRetriever);
       
   119 
       
   120 	RMobilePhone::TMobileInfoLocation location = RMobilePhone::EInfoLocationCachePreferred;	
       
   121 
       
   122 	asyncRetrieveMobilePhoneCWList->Start(activeRetriever->iStatus, location);
       
   123 	activeRetriever->Activate();
       
   124 	scheduler.StartScheduler();
       
   125 	ASSERT_EQUALS(0, CActiveRetriever::ResetRequestsNumber());
       
   126 	ASSERT_EQUALS(KErrNotSupported, activeRetriever->iStatus.Int());
       
   127 	
       
   128 	AssertMockLtsyStatusL();	
       
   129 	config.Reset();
       
   130 	CleanupStack::PopAndDestroy(3, this); // activeRetriever, asyncRetrieveMobilePhoneCWList, this
       
   131 	}
       
   132 
       
   133 /**
       
   134 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0003
       
   135 @SYMComponent telephony_ctsy
       
   136 @SYMTestCaseDesc Test returned value if EMobilePhoneSendNetworkServiceRequest is not supported by LTSY
       
   137 @SYMTestPriority High
       
   138 @SYMTestActions Invokes RMobilePhone::SendNetworkServiceRequest()
       
   139 @SYMTestExpectedResults Pass
       
   140 @SYMTestType UT
       
   141 */
       
   142 void CCTsySupplementaryServicesFUNegative::TestUnit0003L()
       
   143 	{
       
   144 	TConfig config;
       
   145 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSendNetworkServiceRequest::KLtsyDispatchSupplementaryServicesSendNetworkServiceRequestApiId, EFalse);
       
   146 	
       
   147 	OpenEtelServerL(EUseExtendedError);
       
   148 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   149 	OpenPhoneL();
       
   150 	
       
   151     TRequestStatus requestStatus;
       
   152 	_LIT(KMsg1,"SendNetworkServiceRequest1.1");
       
   153 	TName expServiceString(KMsg1);
       
   154     	
       
   155 	iPhone.SendNetworkServiceRequest(requestStatus, expServiceString);
       
   156     User::WaitForRequest(requestStatus);
       
   157     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   158 
       
   159     AssertMockLtsyStatusL();
       
   160 	config.Reset();
       
   161 	CleanupStack::PopAndDestroy(this); // this
       
   162 	}
       
   163 
       
   164 /**
       
   165 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0004
       
   166 @SYMComponent telephony_ctsy
       
   167 @SYMTestCaseDesc Test returned value if EMobilePhoneGetBarringStatusPhase1 is not supported by LTSY
       
   168 @SYMTestPriority High
       
   169 @SYMTestActions Invokes CRetrieveMobilePhoneCBList::Start()
       
   170 @SYMTestExpectedResults Pass
       
   171 @SYMTestType UT
       
   172 */
       
   173 void CCTsySupplementaryServicesFUNegative::TestUnit0004L()
       
   174 	{
       
   175 	TConfig config;
       
   176 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesGetCallBarringStatus::KLtsyDispatchSupplementaryServicesGetCallBarringStatusApiId, EFalse);
       
   177 	
       
   178 	OpenEtelServerL(EUseExtendedError);
       
   179 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   180 	OpenPhoneL();
       
   181 	
       
   182 	CFilteringActiveScheduler scheduler;
       
   183 	CActiveScheduler::Install(&scheduler);
       
   184 	
       
   185 	CRetrieveMobilePhoneCBList* phoneCBList = CRetrieveMobilePhoneCBList::NewL(iPhone);
       
   186 	CleanupStack::PushL(phoneCBList);
       
   187 	
       
   188 	CActiveRetriever::ResetRequestsNumber();
       
   189 	CActiveRetriever* activeRetriever = CActiveRetriever::NewL(*phoneCBList);
       
   190 	CleanupStack::PushL(activeRetriever);
       
   191 	scheduler.AddRetrieverL(*activeRetriever);
       
   192 	
       
   193 	RMobilePhone::TMobilePhoneCBCondition condition = RMobilePhone::EBarAllIncoming;
       
   194 
       
   195 	phoneCBList->Start(activeRetriever->iStatus, condition);
       
   196 	activeRetriever->Activate();
       
   197 	scheduler.StartScheduler();
       
   198 	ASSERT_EQUALS(0, CActiveRetriever::ResetRequestsNumber())
       
   199 	ASSERT_EQUALS(KErrNotSupported, activeRetriever->iStatus.Int())
       
   200 
       
   201 	AssertMockLtsyStatusL();
       
   202 	config.Reset();
       
   203 	CleanupStack::PopAndDestroy(3, this); // activeRetriever, iCBList, this
       
   204 	}
       
   205 
       
   206 /**
       
   207 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0005
       
   208 @SYMComponent telephony_ctsy
       
   209 @SYMTestCaseDesc Test returned value if EMobilePhoneSetCallBarringStatus is not supported by LTSY
       
   210 @SYMTestPriority High
       
   211 @SYMTestActions Invokes RMobilePhone::SetCallBarringStatus()
       
   212 @SYMTestExpectedResults Pass
       
   213 @SYMTestType UT
       
   214 */
       
   215 void CCTsySupplementaryServicesFUNegative::TestUnit0005L()
       
   216 	{
       
   217 	TConfig config;
       
   218 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSetCallBarringStatus::KLtsyDispatchSupplementaryServicesSetCallBarringStatusApiId, EFalse);
       
   219 	
       
   220 	OpenEtelServerL(EUseExtendedError);
       
   221 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   222 	OpenPhoneL();
       
   223 	
       
   224     TRequestStatus requestStatus;
       
   225 	RMobilePhone::TMobilePhoneCBCondition setCondition = RMobilePhone::EBarIncomingRoaming;
       
   226 	RMobilePhone::TMobilePhoneCBChangeV1 setInfo;
       
   227 	setInfo.iAction = RMobilePhone::EServiceActionDeactivate;
       
   228 	setInfo.iServiceGroup = RMobilePhone::EPadAccess;
       
   229 	_LIT(KPassword,"1234");
       
   230 	setInfo.iPassword = KPassword;
       
   231 	
       
   232 	iPhone.SetCallBarringStatus(requestStatus, setCondition, setInfo);
       
   233     User::WaitForRequest(requestStatus);
       
   234     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   235 
       
   236     AssertMockLtsyStatusL();
       
   237 	config.Reset();
       
   238 	CleanupStack::PopAndDestroy(this); // this
       
   239 	}
       
   240 
       
   241 /**
       
   242 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0006
       
   243 @SYMComponent telephony_ctsy
       
   244 @SYMTestCaseDesc Test returned value if EMobilePhoneSetCallForwardingStatus is not supported by LTSY
       
   245 @SYMTestPriority High
       
   246 @SYMTestActions Invokes RMobilePhone::SetCallForwardingStatus()
       
   247 @SYMTestExpectedResults Pass
       
   248 @SYMTestType UT
       
   249 */
       
   250 void CCTsySupplementaryServicesFUNegative::TestUnit0006L()
       
   251 	{
       
   252 	TConfig config;
       
   253 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSetCallForwardingStatus::KLtsyDispatchSupplementaryServicesSetCallForwardingStatusApiId, EFalse);
       
   254 	
       
   255 	OpenEtelServerL(EUseExtendedError);
       
   256 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   257 	OpenPhoneL();
       
   258 	
       
   259     TRequestStatus requestStatus;
       
   260 	RMobilePhone::TMobilePhoneCFCondition setCondition = RMobilePhone::ECallForwardingNoReply;
       
   261 	RMobilePhone::TMobilePhoneCFChangeV1  callForwardinginfo;
       
   262 
       
   263 	callForwardinginfo.iAction = RMobilePhone::EServiceActionRegister;
       
   264 	callForwardinginfo.iNumber.iTypeOfNumber = RMobilePhone::EInternationalNumber;
       
   265 	callForwardinginfo.iNumber.iNumberPlan   = RMobilePhone::EIsdnNumberPlan;
       
   266 	_LIT(KTelNumber,"+74951000000");
       
   267 	callForwardinginfo.iNumber.iTelNumber.Copy(KTelNumber);
       
   268 	callForwardinginfo.iServiceGroup = RMobilePhone::EVoiceService;
       
   269 	callForwardinginfo.iTimeout = 20;
       
   270 	
       
   271 	iPhone.SetCallForwardingStatus(requestStatus, setCondition, callForwardinginfo);
       
   272     User::WaitForRequest(requestStatus);
       
   273     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   274 
       
   275     AssertMockLtsyStatusL();
       
   276 	config.Reset();
       
   277 	CleanupStack::PopAndDestroy(this); // this
       
   278 	}
       
   279 
       
   280 /**
       
   281 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0007
       
   282 @SYMComponent telephony_ctsy
       
   283 @SYMTestCaseDesc Test returned value if EMobilePhoneSetCallWaitingStatus is not supported by LTSY
       
   284 @SYMTestPriority High
       
   285 @SYMTestActions Invokes RMobilePhone::SetCallWaitingStatus()
       
   286 @SYMTestExpectedResults Pass
       
   287 @SYMTestType UT
       
   288 */
       
   289 void CCTsySupplementaryServicesFUNegative::TestUnit0007L()
       
   290 	{
       
   291 	TConfig config;
       
   292 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSetCallWaitingStatus::KLtsyDispatchSupplementaryServicesSetCallWaitingStatusApiId, EFalse);
       
   293 	
       
   294 	OpenEtelServerL(EUseExtendedError);
       
   295 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   296 	OpenPhoneL();
       
   297 	
       
   298     TRequestStatus requestStatus;
       
   299     RMobilePhone::TMobileService setService = RMobilePhone::EPadAccess;
       
   300     RMobilePhone::TMobilePhoneServiceAction setAction = RMobilePhone::EServiceActionActivate;
       
   301     	
       
   302 	iPhone.SetCallWaitingStatus(requestStatus, setService, setAction);
       
   303     User::WaitForRequest(requestStatus);
       
   304     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   305 
       
   306     AssertMockLtsyStatusL();
       
   307 	config.Reset();
       
   308 	CleanupStack::PopAndDestroy(this); // this
       
   309 	}
       
   310 
       
   311 /**
       
   312 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0008
       
   313 @SYMComponent telephony_ctsy
       
   314 @SYMTestCaseDesc Test returned value if EMobilePhoneSetSSPassword is not supported by LTSY
       
   315 @SYMTestPriority High
       
   316 @SYMTestActions Invokes RMobilePhone::SetSSPassword()
       
   317 @SYMTestExpectedResults Pass
       
   318 @SYMTestType UT
       
   319 */
       
   320 void CCTsySupplementaryServicesFUNegative::TestUnit0008L()
       
   321 	{
       
   322 	TConfig config;
       
   323 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSetSsPassword::KLtsyDispatchSupplementaryServicesSetSsPasswordApiId, EFalse);
       
   324 	
       
   325 	OpenEtelServerL(EUseExtendedError);
       
   326 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   327 	OpenPhoneL();
       
   328 	
       
   329     TRequestStatus requestStatus;
       
   330 	_LIT(KOldPassword,"oldPswd");
       
   331 	_LIT(KNewPassword,"newPswd");
       
   332 	RMobilePhone::TMobilePhonePasswordChangeV2 pwdChange;
       
   333 	pwdChange.iOldPassword.Copy(KOldPassword);
       
   334 	pwdChange.iNewPassword.Copy(KNewPassword);
       
   335 	pwdChange.iVerifiedPassword.Copy(KNewPassword);
       
   336 	TPckg<RMobilePhone::TMobilePhonePasswordChangeV2> password(pwdChange);
       
   337 	TUint16 service = 330; // Can be only 0 for all or 330 for Barring 
       
   338     	
       
   339 	iPhone.SetSSPassword(requestStatus,password,service);
       
   340     User::WaitForRequest(requestStatus);
       
   341     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   342 
       
   343     AssertMockLtsyStatusL();
       
   344 	config.Reset();
       
   345 	CleanupStack::PopAndDestroy(this); // this
       
   346 	}
       
   347 
       
   348 /**
       
   349 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0009
       
   350 @SYMComponent telephony_ctsy
       
   351 @SYMTestCaseDesc Test returned value if EMobilePhoneGetCallForwardingStatusPhase1 is not supported by LTSY
       
   352 @SYMTestPriority High
       
   353 @SYMTestActions Invokes CRetrieveMobilePhoneCFList::Start()
       
   354 @SYMTestExpectedResults Pass
       
   355 @SYMTestType UT
       
   356 */
       
   357 void CCTsySupplementaryServicesFUNegative::TestUnit0009L()
       
   358 	{
       
   359 	TConfig config;
       
   360 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesGetCallForwardingStatus::KLtsyDispatchSupplementaryServicesGetCallForwardingStatusApiId, EFalse);
       
   361 	
       
   362 	OpenEtelServerL(EUseExtendedError);
       
   363 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   364 	OpenPhoneL();
       
   365 	
       
   366 	CFilteringActiveScheduler scheduler;
       
   367 	CActiveScheduler::Install(&scheduler);
       
   368 
       
   369 	CRetrieveMobilePhoneCFList* asyncRetrieveMobilePhoneCFList = CRetrieveMobilePhoneCFList::NewL(iPhone);    
       
   370 	CleanupStack::PushL(asyncRetrieveMobilePhoneCFList);
       
   371 
       
   372 	CActiveRetriever::ResetRequestsNumber();
       
   373 	CActiveRetriever* activeRetriever = CActiveRetriever::NewL(*asyncRetrieveMobilePhoneCFList);
       
   374 	CleanupStack::PushL(activeRetriever);
       
   375 	scheduler.AddRetrieverL(*activeRetriever);
       
   376 
       
   377 	RMobilePhone::TMobilePhoneCFCondition condition(RMobilePhone::ECallForwardingUnconditional);
       
   378 	RMobilePhone::TMobileService serviceGroup(RMobilePhone::EServiceUnspecified);
       
   379 	RMobilePhone::TMobileInfoLocation location = RMobilePhone::EInfoLocationCachePreferred;
       
   380 		
       
   381 	asyncRetrieveMobilePhoneCFList->Start(activeRetriever->iStatus, condition, serviceGroup, location);
       
   382 	activeRetriever->Activate();
       
   383 	scheduler.StartScheduler();
       
   384 	ASSERT_EQUALS(0, CActiveRetriever::ResetRequestsNumber());
       
   385 	ASSERT_EQUALS(KErrNotSupported, activeRetriever->iStatus.Int());
       
   386 	
       
   387 	AssertMockLtsyStatusL();	
       
   388 	config.Reset();
       
   389 	CleanupStack::PopAndDestroy(3, this); // activeRetriever, asyncRetrieveMobilePhoneCFList, this
       
   390 	}
       
   391 
       
   392 /**
       
   393 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0010
       
   394 @SYMComponent telephony_ctsy
       
   395 @SYMTestCaseDesc Test returned value if EMobileUssdMessagingSendMessage is not supported by LTSY
       
   396 @SYMTestPriority High
       
   397 @SYMTestActions Invokes RMobileUssdMessaging::SendMessage()
       
   398 @SYMTestExpectedResults Pass
       
   399 @SYMTestType UT
       
   400 */
       
   401 void CCTsySupplementaryServicesFUNegative::TestUnit0010L()
       
   402 	{
       
   403 	TConfig config;
       
   404 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSendUssdMessage::KLtsyDispatchSupplementaryServicesSendUssdMessageApiId, EFalse);
       
   405 	
       
   406 	OpenEtelServerL(EUseExtendedError);
       
   407 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   408 	OpenPhoneL();
       
   409 	
       
   410 	TRequestStatus requestStatus;
       
   411 	RMobileUssdMessaging ussdMessaging;
       
   412 	ASSERT_EQUALS(KErrNone, ussdMessaging.Open(iPhone));
       
   413 	CleanupClosePushL(ussdMessaging);
       
   414 	
       
   415 	_LIT8(KMsg1,"SendMessage1.1");
       
   416 	RMobileUssdMessaging::TGsmUssdMessageData expSendData(KMsg1);
       
   417 	RMobileUssdMessaging::TMobileUssdAttributesV1 expSendAttr;
       
   418 	RMobileUssdMessaging::TMobileUssdAttributesV1Pckg sendAttrPckg(expSendAttr);
       
   419 	
       
   420 	ussdMessaging.SendMessage(requestStatus, expSendData, sendAttrPckg);
       
   421     User::WaitForRequest(requestStatus);
       
   422     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   423     
       
   424     AssertMockLtsyStatusL();
       
   425 	config.Reset();
       
   426 	CleanupStack::PopAndDestroy(2, this); // ussdMessaging, this
       
   427 	}
       
   428 
       
   429 /**
       
   430 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0011
       
   431 @SYMComponent telephony_ctsy
       
   432 @SYMTestCaseDesc Test returned value if EMobileUssdMessagingSendMessageNoFdnCheck is not supported by LTSY
       
   433 @SYMTestPriority High
       
   434 @SYMTestActions Invokes RMobileUssdMessaging::SendMessageNoFdnCheck()
       
   435 @SYMTestExpectedResults Pass
       
   436 @SYMTestType UT
       
   437 */
       
   438 void CCTsySupplementaryServicesFUNegative::TestUnit0011L()
       
   439 	{
       
   440 	TConfig config;
       
   441 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSendUssdMessageNoFdnCheck::KLtsyDispatchSupplementaryServicesSendUssdMessageNoFdnCheckApiId, EFalse);
       
   442 	
       
   443 	OpenEtelServerL(EUseExtendedError);
       
   444 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   445 	OpenPhoneL();
       
   446 	
       
   447 	TRequestStatus requestStatus;
       
   448 	RMobileUssdMessaging ussdMessaging;
       
   449 	ASSERT_EQUALS(KErrNone, ussdMessaging.Open(iPhone));
       
   450 	CleanupClosePushL(ussdMessaging);
       
   451 	
       
   452 	_LIT8(KMsg1,"SendMessage1.1");
       
   453 	RMobileUssdMessaging::TGsmUssdMessageData expSendData(KMsg1);
       
   454 	RMobileUssdMessaging::TMobileUssdAttributesV1 expSendAttr;
       
   455 	RMobileUssdMessaging::TMobileUssdAttributesV1Pckg sendAttrPckg(expSendAttr);
       
   456 	
       
   457 	ussdMessaging.SendMessageNoFdnCheck(requestStatus, expSendData, sendAttrPckg);
       
   458     User::WaitForRequest(requestStatus);
       
   459     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   460     
       
   461     AssertMockLtsyStatusL();
       
   462 	config.Reset();
       
   463 	CleanupStack::PopAndDestroy(2, this); // ussdMessaging, this
       
   464 	}
       
   465 
       
   466 /**
       
   467 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0012
       
   468 @SYMComponent telephony_ctsy
       
   469 @SYMTestCaseDesc Test returned value if EMobileUssdMessagingSendRelease is not supported by LTSY
       
   470 @SYMTestPriority High
       
   471 @SYMTestActions Invokes RMobileUssdMessaging::SendRelease()
       
   472 @SYMTestExpectedResults Pass
       
   473 @SYMTestType UT
       
   474 */
       
   475 void CCTsySupplementaryServicesFUNegative::TestUnit0012L()
       
   476 	{
       
   477 	TConfig config;
       
   478 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesSendUssdRelease::KLtsyDispatchSupplementaryServicesSendUssdReleaseApiId, EFalse);
       
   479 	
       
   480 	OpenEtelServerL(EUseExtendedError);
       
   481 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   482 	OpenPhoneL();
       
   483 	
       
   484 	TRequestStatus requestStatus;
       
   485 	RMobileUssdMessaging ussdMessaging;
       
   486 	ASSERT_EQUALS(KErrNone, ussdMessaging.Open(iPhone));
       
   487 	CleanupClosePushL(ussdMessaging);
       
   488 
       
   489 	RMobilePhone::TMobilePhoneSendSSRequestV3 sendSSRequest;
       
   490 	RMobilePhone::TMobilePhoneSendSSRequestV3Pckg sendSSRequestPckg(sendSSRequest);
       
   491 	
       
   492 	ussdMessaging.SendRelease(requestStatus, sendSSRequestPckg);
       
   493     User::WaitForRequest(requestStatus);
       
   494     ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());    
       
   495     
       
   496     AssertMockLtsyStatusL();
       
   497 	config.Reset();
       
   498 	CleanupStack::PopAndDestroy(2, this); // ussdMessaging, this
       
   499 	}
       
   500 
       
   501 /**
       
   502 @SYMTestCaseID BA-CTSYD-DIS-SUPPLEMENTARYSERVICES-NEGATIVE-UN0013
       
   503 @SYMComponent telephony_ctsy
       
   504 @SYMTestCaseDesc Test returned value if ECustomClearCallBlackListIPC is not supported by LTSY
       
   505 @SYMTestPriority High
       
   506 @SYMTestActions Invokes RMmCustomAPI::ClearCallBlackList()
       
   507 @SYMTestExpectedResults Pass
       
   508 @SYMTestType UT
       
   509 */
       
   510 void CCTsySupplementaryServicesFUNegative::TestUnit0013L()
       
   511 	{
       
   512 	TConfig config;
       
   513 	config.SetSupportedValue(MLtsyDispatchSupplementaryServicesClearBlacklist::KLtsyDispatchSupplementaryServicesClearBlacklistApiId, EFalse);
       
   514 	
       
   515 	OpenEtelServerL(EUseExtendedError);
       
   516 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   517 	OpenPhoneL();
       
   518 	
       
   519 	TRequestStatus requestStatus;	
       
   520 	RMmCustomAPI customApi;
       
   521 	OpenCustomApiLC(customApi);
       
   522     
       
   523 	customApi.ClearCallBlackList(requestStatus);
       
   524 	User::WaitForRequest(requestStatus);
       
   525  	ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
       
   526     
       
   527 	AssertMockLtsyStatusL();
       
   528 	config.Reset();
       
   529 	CleanupStack::PopAndDestroy(2, this); // customApi, this
       
   530 	}