cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.cpp
changeset 42 35488577e233
parent 15 d7fc66ccd6fb
child 48 78df25012fda
equal deleted inserted replaced
38:bc103bfb69cf 42:35488577e233
   113     RMobilePhone dummyPhone;
   113     RMobilePhone dummyPhone;
   114     
   114     
   115     CPsetCallBarring *barringMock = NULL;
   115     CPsetCallBarring *barringMock = NULL;
   116     TRAPD(result, barringMock = CPsetCallBarring::NewL(dummyObserver, dummyPhone));
   116     TRAPD(result, barringMock = CPsetCallBarring::NewL(dummyObserver, dummyPhone));
   117     QScopedPointer<CPsetCallBarring> barringMockGuard(barringMock);
   117     QScopedPointer<CPsetCallBarring> barringMockGuard(barringMock);
   118     EXPECT(CPsetContainer::CreateCBObjectL)
   118     EXPECT(CPsetContainer, CreateCBObjectL)
   119         .returns(barringMock);
   119         .returns(barringMock);
   120     m_wrapper = new PSetCallBarringWrapper(*m_psetContainerMock, NULL);
   120     m_wrapper = new PSetCallBarringWrapper(*m_psetContainerMock, NULL);
   121     barringMockGuard.take();
   121     barringMockGuard.take();
   122     
   122     
   123     QVERIFY(verify());
   123     QVERIFY(verify());
   141 /*!
   141 /*!
   142   UT_PSetCallBarringWrapper::t_construction
   142   UT_PSetCallBarringWrapper::t_construction
   143  */
   143  */
   144 void UT_PSetCallBarringWrapper::t_construction()
   144 void UT_PSetCallBarringWrapper::t_construction()
   145 {
   145 {
   146     EXPECT(CPsetContainer::CreateCBObjectL).
   146     EXPECT(CPsetContainer, CreateCBObjectL).
   147         willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall));
   147         willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall));
   148     PSetCallBarringWrapper *wrapper = NULL;
   148     PSetCallBarringWrapper *wrapper = NULL;
   149     EXPECT_EXCEPTION(
   149     EXPECT_EXCEPTION(
   150         wrapper = new PSetCallBarringWrapper(*m_psetContainerMock, NULL););
   150         wrapper = new PSetCallBarringWrapper(*m_psetContainerMock, NULL););
   151 }
   151 }
   155   UT_PSetCallBarringWrapper::t_barringStatus
   155   UT_PSetCallBarringWrapper::t_barringStatus
   156  */
   156  */
   157 void UT_PSetCallBarringWrapper::t_barringStatus()
   157 void UT_PSetCallBarringWrapper::t_barringStatus()
   158 {
   158 {
   159 // test status query with different service groups
   159 // test status query with different service groups
   160     EXPECT(CPsetCallBarring::GetBarringStatusL)
   160     EXPECT(CPsetCallBarring, GetBarringStatusL)
   161         .with(EServiceGroupVoice, EBarringTypeAllBarrings);
   161         .with(EServiceGroupVoice, EBarringTypeAllBarrings);
   162     EXPECT(CPsetCallBarring::GetBarringStatusL)
   162     EXPECT(CPsetCallBarring, GetBarringStatusL)
   163         .with(EServiceGroupData, EBarringTypeAllBarrings);
   163         .with(EServiceGroupData, EBarringTypeAllBarrings);
   164     EXPECT(CPsetCallBarring::GetBarringStatusL)
   164     EXPECT(CPsetCallBarring, GetBarringStatusL)
   165         .with(EServiceGroupFax, EBarringTypeAllBarrings);
   165         .with(EServiceGroupFax, EBarringTypeAllBarrings);
   166     EXPECT(CPsetCallBarring::GetBarringStatusL)
   166     EXPECT(CPsetCallBarring, GetBarringStatusL)
   167         .with(EServiceGroupAllTeleservices, EBarringTypeAllBarrings);
   167         .with(EServiceGroupAllTeleservices, EBarringTypeAllBarrings);
   168     // invalid/unknown enumeration as service group identifier
   168     // invalid/unknown enumeration as service group identifier
   169     EXPECT(CPsetCallBarring::GetBarringStatusL)
   169     EXPECT(CPsetCallBarring, GetBarringStatusL)
   170         .with(EServiceGroupVoice, EBarringTypeAllBarrings);
   170         .with(EServiceGroupVoice, EBarringTypeAllBarrings);
   171     
   171     
   172     //TODO: remove SeviceGroupUnknown enumeration?
   172     //TODO: remove SeviceGroupUnknown enumeration?
   173     //m_wrapper->barringStatus(ServiceGroupUnknown);
   173     //m_wrapper->barringStatus(ServiceGroupUnknown);
   174     m_wrapper->barringStatus(ServiceGroupVoice, 
   174     m_wrapper->barringStatus(ServiceGroupVoice, 
   183     m_wrapper->barringStatus(
   183     m_wrapper->barringStatus(
   184         static_cast<PsService>(KInvalidEnumeration),
   184         static_cast<PsService>(KInvalidEnumeration),
   185         PSetCallBarringWrapper::BarringTypeAllBarrings);
   185         PSetCallBarringWrapper::BarringTypeAllBarrings);
   186 
   186 
   187 // test status query with different barring types    
   187 // test status query with different barring types    
   188     EXPECT(CPsetCallBarring::GetBarringStatusL)
   188     EXPECT(CPsetCallBarring, GetBarringStatusL)
   189         .with(EServiceGroupVoice, EBarringTypeAllOutgoing);
   189         .with(EServiceGroupVoice, EBarringTypeAllOutgoing);
   190     EXPECT(CPsetCallBarring::GetBarringStatusL)
   190     EXPECT(CPsetCallBarring, GetBarringStatusL)
   191         .with(EServiceGroupVoice, EBarringTypeOutgoingInternational);
   191         .with(EServiceGroupVoice, EBarringTypeOutgoingInternational);
   192     EXPECT(CPsetCallBarring::GetBarringStatusL)
   192     EXPECT(CPsetCallBarring, GetBarringStatusL)
   193         .with(EServiceGroupVoice, 
   193         .with(EServiceGroupVoice, 
   194             EBarringTypeOutgoingInternationalExceptToHomeCountry);
   194             EBarringTypeOutgoingInternationalExceptToHomeCountry);
   195     EXPECT(CPsetCallBarring::GetBarringStatusL)
   195     EXPECT(CPsetCallBarring, GetBarringStatusL)
   196         .with(EServiceGroupVoice, EBarringTypeAllIncoming);
   196         .with(EServiceGroupVoice, EBarringTypeAllIncoming);
   197     EXPECT(CPsetCallBarring::GetBarringStatusL)
   197     EXPECT(CPsetCallBarring, GetBarringStatusL)
   198         .with(EServiceGroupVoice, EBarringTypeIncomingWhenRoaming);
   198         .with(EServiceGroupVoice, EBarringTypeIncomingWhenRoaming);
   199     EXPECT(CPsetCallBarring::GetBarringStatusL)
   199     EXPECT(CPsetCallBarring, GetBarringStatusL)
   200         .with(EServiceGroupVoice, EBarringTypeAllServices);
   200         .with(EServiceGroupVoice, EBarringTypeAllServices);
   201     EXPECT(CPsetCallBarring::GetBarringStatusL)
   201     EXPECT(CPsetCallBarring, GetBarringStatusL)
   202         .with(EServiceGroupVoice, EBarringTypeAllOutgoingServices);
   202         .with(EServiceGroupVoice, EBarringTypeAllOutgoingServices);
   203     EXPECT(CPsetCallBarring::GetBarringStatusL)
   203     EXPECT(CPsetCallBarring, GetBarringStatusL)
   204         .with(EServiceGroupVoice, EBarringTypeAllIncomingServices);
   204         .with(EServiceGroupVoice, EBarringTypeAllIncomingServices);
   205     // invalid/unknown enumeration as barring type
   205     // invalid/unknown enumeration as barring type
   206     EXPECT(CPsetCallBarring::GetBarringStatusL)
   206     EXPECT(CPsetCallBarring, GetBarringStatusL)
   207         .with(EServiceGroupVoice, EBarringTypeAllBarrings);
   207         .with(EServiceGroupVoice, EBarringTypeAllBarrings);
   208     m_wrapper->barringStatus(ServiceGroupVoice, 
   208     m_wrapper->barringStatus(ServiceGroupVoice, 
   209         PSetCallBarringWrapper::BarringTypeAllOutgoing);
   209         PSetCallBarringWrapper::BarringTypeAllOutgoing);
   210     m_wrapper->barringStatus(ServiceGroupVoice, 
   210     m_wrapper->barringStatus(ServiceGroupVoice, 
   211         PSetCallBarringWrapper::BarringTypeOutgoingInternational);
   211         PSetCallBarringWrapper::BarringTypeOutgoingInternational);
   233 /*!
   233 /*!
   234   UT_PSetCallBarringWrapper::t_barringStatusExceptionOccurs
   234   UT_PSetCallBarringWrapper::t_barringStatusExceptionOccurs
   235  */
   235  */
   236 void UT_PSetCallBarringWrapper::t_barringStatusExceptionOccurs()
   236 void UT_PSetCallBarringWrapper::t_barringStatusExceptionOccurs()
   237 {
   237 {
   238     EXPECT(CPsetCallBarring::GetBarringStatusL)
   238     EXPECT(CPsetCallBarring, GetBarringStatusL)
   239         .willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall));
   239         .willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall));
   240     
   240     
   241     EXPECT_EXCEPTION(
   241     EXPECT_EXCEPTION(
   242         m_wrapper->barringStatus(
   242         m_wrapper->barringStatus(
   243             ServiceGroupVoice, 
   243             ServiceGroupVoice, 
   257     TCallBarringSetting setting;
   257     TCallBarringSetting setting;
   258     setting.iType = EBarringTypeAllBarrings;
   258     setting.iType = EBarringTypeAllBarrings;
   259     setting.iSetting = EActivateBarring;
   259     setting.iSetting = EActivateBarring;
   260     setting.iServiceGroup = EServiceGroupVoice;
   260     setting.iServiceGroup = EServiceGroupVoice;
   261     setting.iPassword.Copy(KPassword());
   261     setting.iPassword.Copy(KPassword());
   262     EXPECT(CPsetCallBarring::SetBarringL)
   262     EXPECT(CPsetCallBarring, SetBarringL)
   263         .with(setting, EAllTeleAndBearer);
   263         .with(setting, EAllTeleAndBearer);
   264     m_wrapper->enableBarring(
   264     m_wrapper->enableBarring(
   265         ServiceGroupVoice, 
   265         ServiceGroupVoice, 
   266         PSetCallBarringWrapper::BarringTypeAllBarrings,
   266         PSetCallBarringWrapper::BarringTypeAllBarrings,
   267         QString("1234"));
   267         QString("1234"));
   268 
   268 
   269     setting.iType = EBarringTypeAllOutgoing;
   269     setting.iType = EBarringTypeAllOutgoing;
   270     EXPECT(CPsetCallBarring::SetBarringL)
   270     EXPECT(CPsetCallBarring, SetBarringL)
   271         .with(setting, EAllTeleAndBearer);
   271         .with(setting, EAllTeleAndBearer);
   272     m_wrapper->enableBarring(
   272     m_wrapper->enableBarring(
   273         ServiceGroupVoice, 
   273         ServiceGroupVoice, 
   274         PSetCallBarringWrapper::BarringTypeAllOutgoing,
   274         PSetCallBarringWrapper::BarringTypeAllOutgoing,
   275         QString("1234"));
   275         QString("1234"));
   276     
   276     
   277     setting.iType = EBarringTypeOutgoingInternational;
   277     setting.iType = EBarringTypeOutgoingInternational;
   278     EXPECT(CPsetCallBarring::SetBarringL)
   278     EXPECT(CPsetCallBarring, SetBarringL)
   279         .with(setting, EAllTeleAndBearer);
   279         .with(setting, EAllTeleAndBearer);
   280     m_wrapper->enableBarring(
   280     m_wrapper->enableBarring(
   281         ServiceGroupVoice, 
   281         ServiceGroupVoice, 
   282         PSetCallBarringWrapper::BarringTypeOutgoingInternational,
   282         PSetCallBarringWrapper::BarringTypeOutgoingInternational,
   283         QString("1234"));
   283         QString("1234"));
   284 
   284 
   285     setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry;
   285     setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry;
   286     EXPECT(CPsetCallBarring::SetBarringL)
   286     EXPECT(CPsetCallBarring, SetBarringL)
   287         .with(setting, EAllTeleAndBearer);
   287         .with(setting, EAllTeleAndBearer);
   288     m_wrapper->enableBarring(
   288     m_wrapper->enableBarring(
   289         ServiceGroupVoice, 
   289         ServiceGroupVoice, 
   290         PSetCallBarringWrapper::BarringTypeOutgoingInternationalExceptToHomeCountry,
   290         PSetCallBarringWrapper::BarringTypeOutgoingInternationalExceptToHomeCountry,
   291         QString("1234"));
   291         QString("1234"));
   292     
   292     
   293     setting.iType = EBarringTypeAllIncoming;
   293     setting.iType = EBarringTypeAllIncoming;
   294     EXPECT(CPsetCallBarring::SetBarringL)
   294     EXPECT(CPsetCallBarring, SetBarringL)
   295         .with(setting, EAllTeleAndBearer);
   295         .with(setting, EAllTeleAndBearer);
   296     m_wrapper->enableBarring(
   296     m_wrapper->enableBarring(
   297         ServiceGroupVoice, 
   297         ServiceGroupVoice, 
   298         PSetCallBarringWrapper::BarringTypeAllIncoming,
   298         PSetCallBarringWrapper::BarringTypeAllIncoming,
   299         QString("1234"));
   299         QString("1234"));
   300     
   300     
   301     setting.iType = EBarringTypeIncomingWhenRoaming;
   301     setting.iType = EBarringTypeIncomingWhenRoaming;
   302     EXPECT(CPsetCallBarring::SetBarringL)
   302     EXPECT(CPsetCallBarring, SetBarringL)
   303         .with(setting, EAllTeleAndBearer);
   303         .with(setting, EAllTeleAndBearer);
   304     m_wrapper->enableBarring(
   304     m_wrapper->enableBarring(
   305         ServiceGroupVoice, 
   305         ServiceGroupVoice, 
   306         PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming,
   306         PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming,
   307         QString("1234"));
   307         QString("1234"));
   308     
   308     
   309     setting.iType = EBarringTypeAllServices;
   309     setting.iType = EBarringTypeAllServices;
   310     EXPECT(CPsetCallBarring::SetBarringL)
   310     EXPECT(CPsetCallBarring, SetBarringL)
   311         .with(setting, EAllTeleAndBearer);
   311         .with(setting, EAllTeleAndBearer);
   312     m_wrapper->enableBarring(
   312     m_wrapper->enableBarring(
   313         ServiceGroupVoice, 
   313         ServiceGroupVoice, 
   314         PSetCallBarringWrapper::BarringTypeAllServices,
   314         PSetCallBarringWrapper::BarringTypeAllServices,
   315         QString("1234"));
   315         QString("1234"));
   316 
   316 
   317     setting.iType = EBarringTypeAllOutgoingServices;
   317     setting.iType = EBarringTypeAllOutgoingServices;
   318     EXPECT(CPsetCallBarring::SetBarringL)
   318     EXPECT(CPsetCallBarring, SetBarringL)
   319         .with(setting, EAllTeleAndBearer);
   319         .with(setting, EAllTeleAndBearer);
   320     m_wrapper->enableBarring(
   320     m_wrapper->enableBarring(
   321         ServiceGroupVoice, 
   321         ServiceGroupVoice, 
   322         PSetCallBarringWrapper::BarringTypeAllOutgoingServices,
   322         PSetCallBarringWrapper::BarringTypeAllOutgoingServices,
   323         QString("1234"));
   323         QString("1234"));
   324     
   324     
   325     setting.iType = EBarringTypeAllIncomingServices;
   325     setting.iType = EBarringTypeAllIncomingServices;
   326     EXPECT(CPsetCallBarring::SetBarringL)
   326     EXPECT(CPsetCallBarring, SetBarringL)
   327         .with(setting, EAllTeleAndBearer);
   327         .with(setting, EAllTeleAndBearer);
   328     m_wrapper->enableBarring(
   328     m_wrapper->enableBarring(
   329         ServiceGroupVoice, 
   329         ServiceGroupVoice, 
   330         PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   330         PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   331         QString("1234"));
   331         QString("1234"));
   332 
   332 
   333 // error handling    
   333 // error handling    
   334     EXPECT(CPsetCallBarring::SetBarringL)
   334     EXPECT(CPsetCallBarring, SetBarringL)
   335         .willOnce(invokeWithoutArguments(simulateLeaveL));
   335         .willOnce(invokeWithoutArguments(simulateLeaveL));
   336     EXPECT_EXCEPTION(
   336     EXPECT_EXCEPTION(
   337         m_wrapper->enableBarring(
   337         m_wrapper->enableBarring(
   338             ServiceGroupVoice, 
   338             ServiceGroupVoice, 
   339             PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   339             PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   353     TCallBarringSetting setting;
   353     TCallBarringSetting setting;
   354     setting.iType = EBarringTypeAllBarrings;
   354     setting.iType = EBarringTypeAllBarrings;
   355     setting.iSetting = ECancelBarring;
   355     setting.iSetting = ECancelBarring;
   356     setting.iServiceGroup = EServiceGroupVoice;
   356     setting.iServiceGroup = EServiceGroupVoice;
   357     setting.iPassword.Copy(KPassword());
   357     setting.iPassword.Copy(KPassword());
   358     EXPECT(CPsetCallBarring::SetBarringL)
   358     EXPECT(CPsetCallBarring, SetBarringL)
   359         .with(setting, EAllTeleAndBearer);
   359         .with(setting, EAllTeleAndBearer);
   360     m_wrapper->disableBarring(
   360     m_wrapper->disableBarring(
   361         ServiceGroupVoice, 
   361         ServiceGroupVoice, 
   362         PSetCallBarringWrapper::BarringTypeAllBarrings,
   362         PSetCallBarringWrapper::BarringTypeAllBarrings,
   363         QString("1234"));
   363         QString("1234"));
   364 
   364 
   365     setting.iType = EBarringTypeAllOutgoing;
   365     setting.iType = EBarringTypeAllOutgoing;
   366     EXPECT(CPsetCallBarring::SetBarringL)
   366     EXPECT(CPsetCallBarring, SetBarringL)
   367         .with(setting, EAllTeleAndBearer);
   367         .with(setting, EAllTeleAndBearer);
   368     m_wrapper->disableBarring(
   368     m_wrapper->disableBarring(
   369         ServiceGroupVoice, 
   369         ServiceGroupVoice, 
   370         PSetCallBarringWrapper::BarringTypeAllOutgoing,
   370         PSetCallBarringWrapper::BarringTypeAllOutgoing,
   371         QString("1234"));
   371         QString("1234"));
   372     
   372     
   373     setting.iType = EBarringTypeOutgoingInternational;
   373     setting.iType = EBarringTypeOutgoingInternational;
   374     EXPECT(CPsetCallBarring::SetBarringL)
   374     EXPECT(CPsetCallBarring, SetBarringL)
   375         .with(setting, EAllTeleAndBearer);
   375         .with(setting, EAllTeleAndBearer);
   376     m_wrapper->disableBarring(
   376     m_wrapper->disableBarring(
   377         ServiceGroupVoice, 
   377         ServiceGroupVoice, 
   378         PSetCallBarringWrapper::BarringTypeOutgoingInternational,
   378         PSetCallBarringWrapper::BarringTypeOutgoingInternational,
   379         QString("1234"));
   379         QString("1234"));
   380 
   380 
   381     setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry;
   381     setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry;
   382     EXPECT(CPsetCallBarring::SetBarringL)
   382     EXPECT(CPsetCallBarring, SetBarringL)
   383         .with(setting, EAllTeleAndBearer);
   383         .with(setting, EAllTeleAndBearer);
   384     m_wrapper->disableBarring(
   384     m_wrapper->disableBarring(
   385         ServiceGroupVoice, 
   385         ServiceGroupVoice, 
   386         PSetCallBarringWrapper::BarringTypeOutgoingInternationalExceptToHomeCountry,
   386         PSetCallBarringWrapper::BarringTypeOutgoingInternationalExceptToHomeCountry,
   387         QString("1234"));
   387         QString("1234"));
   388     
   388     
   389     setting.iType = EBarringTypeAllIncoming;
   389     setting.iType = EBarringTypeAllIncoming;
   390     EXPECT(CPsetCallBarring::SetBarringL)
   390     EXPECT(CPsetCallBarring, SetBarringL)
   391         .with(setting, EAllTeleAndBearer);
   391         .with(setting, EAllTeleAndBearer);
   392     m_wrapper->disableBarring(
   392     m_wrapper->disableBarring(
   393         ServiceGroupVoice, 
   393         ServiceGroupVoice, 
   394         PSetCallBarringWrapper::BarringTypeAllIncoming,
   394         PSetCallBarringWrapper::BarringTypeAllIncoming,
   395         QString("1234"));
   395         QString("1234"));
   396     
   396     
   397     setting.iType = EBarringTypeIncomingWhenRoaming;
   397     setting.iType = EBarringTypeIncomingWhenRoaming;
   398     EXPECT(CPsetCallBarring::SetBarringL)
   398     EXPECT(CPsetCallBarring, SetBarringL)
   399         .with(setting, EAllTeleAndBearer);
   399         .with(setting, EAllTeleAndBearer);
   400     m_wrapper->disableBarring(
   400     m_wrapper->disableBarring(
   401         ServiceGroupVoice, 
   401         ServiceGroupVoice, 
   402         PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming,
   402         PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming,
   403         QString("1234"));
   403         QString("1234"));
   404     
   404     
   405     setting.iType = EBarringTypeAllServices;
   405     setting.iType = EBarringTypeAllServices;
   406     EXPECT(CPsetCallBarring::SetBarringL)
   406     EXPECT(CPsetCallBarring, SetBarringL)
   407         .with(setting, EAllTeleAndBearer);
   407         .with(setting, EAllTeleAndBearer);
   408     m_wrapper->disableBarring(
   408     m_wrapper->disableBarring(
   409         ServiceGroupVoice, 
   409         ServiceGroupVoice, 
   410         PSetCallBarringWrapper::BarringTypeAllServices,
   410         PSetCallBarringWrapper::BarringTypeAllServices,
   411         QString("1234"));
   411         QString("1234"));
   412 
   412 
   413     setting.iType = EBarringTypeAllOutgoingServices;
   413     setting.iType = EBarringTypeAllOutgoingServices;
   414     EXPECT(CPsetCallBarring::SetBarringL)
   414     EXPECT(CPsetCallBarring, SetBarringL)
   415         .with(setting, EAllTeleAndBearer);
   415         .with(setting, EAllTeleAndBearer);
   416     m_wrapper->disableBarring(
   416     m_wrapper->disableBarring(
   417         ServiceGroupVoice, 
   417         ServiceGroupVoice, 
   418         PSetCallBarringWrapper::BarringTypeAllOutgoingServices,
   418         PSetCallBarringWrapper::BarringTypeAllOutgoingServices,
   419         QString("1234"));
   419         QString("1234"));
   420     
   420     
   421     setting.iType = EBarringTypeAllIncomingServices;
   421     setting.iType = EBarringTypeAllIncomingServices;
   422     EXPECT(CPsetCallBarring::SetBarringL)
   422     EXPECT(CPsetCallBarring, SetBarringL)
   423         .with(setting, EAllTeleAndBearer);
   423         .with(setting, EAllTeleAndBearer);
   424     m_wrapper->disableBarring(
   424     m_wrapper->disableBarring(
   425         ServiceGroupVoice, 
   425         ServiceGroupVoice, 
   426         PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   426         PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   427         QString("1234"));
   427         QString("1234"));
   428     
   428     
   429 // error handling    
   429 // error handling    
   430     EXPECT(CPsetCallBarring::SetBarringL)
   430     EXPECT(CPsetCallBarring, SetBarringL)
   431         .willOnce(invokeWithoutArguments(simulateLeaveL));
   431         .willOnce(invokeWithoutArguments(simulateLeaveL));
   432     EXPECT_EXCEPTION(
   432     EXPECT_EXCEPTION(
   433         m_wrapper->disableBarring(
   433         m_wrapper->disableBarring(
   434             ServiceGroupVoice, 
   434             ServiceGroupVoice, 
   435             PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   435             PSetCallBarringWrapper::BarringTypeAllIncomingServices,
   450     QString verifiedPassword = "4321";
   450     QString verifiedPassword = "4321";
   451     RMobilePhone::TMobilePhonePasswordChangeV2 passwordChange;
   451     RMobilePhone::TMobilePhonePasswordChangeV2 passwordChange;
   452     passwordChange.iOldPassword.Copy(oldPassword.utf16());
   452     passwordChange.iOldPassword.Copy(oldPassword.utf16());
   453     passwordChange.iNewPassword.Copy(newPassword.utf16());
   453     passwordChange.iNewPassword.Copy(newPassword.utf16());
   454     passwordChange.iVerifiedPassword.Copy(verifiedPassword.utf16());
   454     passwordChange.iVerifiedPassword.Copy(verifiedPassword.utf16());
   455     EXPECT(CPsetCallBarring::ChangePasswordL)
   455     EXPECT(CPsetCallBarring, ChangePasswordL)
   456         .with(passwordChange);
   456         .with(passwordChange);
   457     
   457     
   458     m_wrapper->changeBarringPassword(
   458     m_wrapper->changeBarringPassword(
   459         oldPassword, newPassword, verifiedPassword);
   459         oldPassword, newPassword, verifiedPassword);
   460     
   460     
   461 // error handling    
   461 // error handling    
   462     EXPECT(CPsetCallBarring::ChangePasswordL)
   462     EXPECT(CPsetCallBarring, ChangePasswordL)
   463         .willOnce(invokeWithoutArguments(simulateLeaveL));
   463         .willOnce(invokeWithoutArguments(simulateLeaveL));
   464     EXPECT_EXCEPTION(
   464     EXPECT_EXCEPTION(
   465         m_wrapper->changeBarringPassword(
   465         m_wrapper->changeBarringPassword(
   466             oldPassword, newPassword, verifiedPassword);
   466             oldPassword, newPassword, verifiedPassword);
   467     )
   467     )