275 rsp.iGeneralResult = RSat::KSuccess; |
275 rsp.iGeneralResult = RSat::KSuccess; |
276 rsp.iInfoType = RSat::KSendSsInfo; |
276 rsp.iInfoType = RSat::KSendSsInfo; |
277 rsp.iAdditionalInfo.Zero(); |
277 rsp.iAdditionalInfo.Zero(); |
278 rsp.iAdditionalInfo.Append(KSSOpCodeAndParameters); |
278 rsp.iAdditionalInfo.Append(KSSOpCodeAndParameters); |
279 |
279 |
280 // defect, first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL() |
280 // first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL() |
281 |
281 // Let MockLTsy expect this behaviour |
282 GenerateTerminalResponseL(KCmdId, KSendSs, KCmdDetails, |
282 rsp.iAdditionalInfo.Delete( 0, 1 ); |
283 RSat::ESendSs, rspPckg, rsp.iAdditionalInfo, |
283 |
284 rsp.iGeneralResult); |
284 PrepareTerminalResponseMockDataL( |
|
285 KCmdId, |
|
286 KSendSs, |
|
287 KCmdDetails, |
|
288 rsp.iAdditionalInfo, |
|
289 rsp.iGeneralResult, |
|
290 KNullDesC8); |
|
291 |
|
292 rsp.iAdditionalInfo.Zero(); |
|
293 rsp.iAdditionalInfo.Append( KSSOpCodeAndParameters ); |
|
294 |
|
295 TerminalResponseL( RSat::ESendSs, rspPckg); |
285 |
296 |
286 AssertMockLtsyStatusL(); |
297 AssertMockLtsyStatusL(); |
287 |
298 |
288 //------------------------------------------------------------------------- |
299 //------------------------------------------------------------------------- |
289 // TEST B: failure on completion of pending request from LTSY->CTSY |
300 // TEST B: failure on completion of pending request from LTSY->CTSY |
883 if ( !KResponsesToTest[i].iIntentionallyOmmitAdditionalInfo ) |
894 if ( !KResponsesToTest[i].iIntentionallyOmmitAdditionalInfo ) |
884 { |
895 { |
885 if ( rsp->iInfoType == RSat::KSendSsInfo ) |
896 if ( rsp->iInfoType == RSat::KSendSsInfo ) |
886 { |
897 { |
887 rsp->iAdditionalInfo.Append( KSSOpCodeAndParameters ); |
898 rsp->iAdditionalInfo.Append( KSSOpCodeAndParameters ); |
|
899 |
|
900 // first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL() |
|
901 // Let MockLTsy expect this behaviour |
|
902 if( rsp->iGeneralResult == RSat::KSuccess || |
|
903 rsp->iGeneralResult == RSat::KPartialComprehension || |
|
904 rsp->iGeneralResult == RSat::KMissingInformation || |
|
905 rsp->iGeneralResult == RSat::KSuccessRequestedIconNotDisplayed ) |
|
906 { |
|
907 rsp->iAdditionalInfo.Delete( 0, 1 ); |
|
908 } |
888 } |
909 } |
889 else |
910 else |
890 { |
911 { |
891 rsp->iAdditionalInfo.Append( KResponsesToTest[i].iAdditionalInfo ); |
912 rsp->iAdditionalInfo.Append( KResponsesToTest[i].iAdditionalInfo ); |
892 } |
913 } |
893 } |
914 } |
894 GenerateTerminalResponseL(KCmdId, KSendSs, KCmdDetails, |
915 PrepareTerminalResponseMockDataL( |
895 RSat::ESendSs, *rspPckg, rsp->iAdditionalInfo, |
916 KCmdId, |
896 rsp->iGeneralResult, KNullDesC8, KResponsesToTest[i].iExpectedResult); |
917 KSendSs, |
|
918 KCmdDetails, |
|
919 rsp->iAdditionalInfo, |
|
920 rsp->iGeneralResult, |
|
921 KNullDesC8, |
|
922 KResponsesToTest[i].iExpectedResult); |
|
923 |
|
924 if ( (!KResponsesToTest[i].iIntentionallyOmmitAdditionalInfo && rsp->iInfoType == RSat::KSendSsInfo ) |
|
925 && |
|
926 (rsp->iGeneralResult == RSat::KSuccess || |
|
927 rsp->iGeneralResult == RSat::KPartialComprehension || |
|
928 rsp->iGeneralResult == RSat::KMissingInformation || |
|
929 rsp->iGeneralResult == RSat::KSuccessRequestedIconNotDisplayed) ) |
|
930 { |
|
931 rsp->iAdditionalInfo.Zero(); |
|
932 rsp->iAdditionalInfo.Append( KSSOpCodeAndParameters ); |
|
933 } |
|
934 |
|
935 TerminalResponseL( RSat::ESendSs, *rspPckg, KResponsesToTest[i].iExpectedResult); |
897 } |
936 } |
898 else |
937 else |
899 { |
938 { |
900 // now tell Mock to return KErrUnknown when dispatching forthcoming RSat::TerminalRsp() |
939 // now tell Mock to return KErrUnknown when dispatching forthcoming RSat::TerminalRsp() |
901 rsp->iGeneralResult = RSat::KSuccess; |
940 rsp->iGeneralResult = RSat::KSuccess; |
902 rsp->iInfoType = RSat::KSendSsInfo; |
941 rsp->iInfoType = RSat::KSendSsInfo; |
903 rsp->iAdditionalInfo.Append(KSSOpCodeAndParameters); |
942 rsp->iAdditionalInfo.Append(KSSOpCodeAndParameters); |
|
943 |
|
944 // first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL() |
|
945 // Let MockLTsy expect this behaviour |
|
946 |
|
947 rsp->iAdditionalInfo.Delete( 0, 1 ); |
904 |
948 |
905 PrepareTerminalResponseMockDataL( KCmdId, KSendSs, KCmdDetails, |
949 PrepareTerminalResponseMockDataL( KCmdId, KSendSs, KCmdDetails, |
906 rsp->iAdditionalInfo, rsp->iGeneralResult, KNullDesC8, KErrUnknown); |
950 rsp->iAdditionalInfo, rsp->iGeneralResult, KNullDesC8, KErrUnknown); |
907 |
951 |
|
952 rsp->iAdditionalInfo.Zero(); |
|
953 rsp->iAdditionalInfo.Append( KSSOpCodeAndParameters ); |
|
954 |
908 TerminalResponseL( RSat::ESendSs, *rspPckg, KErrUnknown); |
955 TerminalResponseL( RSat::ESendSs, *rspPckg, KErrUnknown); |
909 } |
956 } |
910 |
957 |
911 AssertMockLtsyStatusL(); |
958 AssertMockLtsyStatusL(); |
912 } |
959 } |