smsprotocols/smsstack/smsprot/Test/TE_Smsprt/TE_SendSMS.cpp
changeset 20 244d7c5f118e
parent 0 3553901f7fa8
child 24 6638e7f4bd8f
--- a/smsprotocols/smsstack/smsprot/Test/TE_Smsprt/TE_SendSMS.cpp	Fri Mar 19 09:55:57 2010 +0200
+++ b/smsprotocols/smsstack/smsprot/Test/TE_Smsprt/TE_SendSMS.cpp	Fri Apr 16 16:12:37 2010 +0300
@@ -24,7 +24,8 @@
 	Each test step initialises it's own name
 */
 	{
-	iSocketServer = &aSocketServer;
+    iSharedSocketServer = &aSocketServer;
+	iPartOfMultiStepTestCase = ETrue;
 	}
 
 /**
@@ -34,38 +35,28 @@
 	{
 #ifndef _DEBUG
     INFO_PRINTF1(_L("This test can only be run when the SMS Stack is in debug mode."));
-#else   	
+#else
 	//Open the socket for sending messages
 	RSocket socket;
-	INFO_PRINTF1(_L("Opening socket and loading SMS Protocol"));
-	OpenSmsSocketL(*iSocketServer, socket, ESmsAddrSendOnly);
-	
+	OpenSmsSocketL(*iSharedSocketServer, socket, ESmsAddrSendOnly);
+    CleanupClosePushL(socket);
+    
 	//Create SMS
-	CSmsMessage* iSms=CreateSMSL();
-	CleanupStack::PushL(iSms);
+	CSmsMessage* sms=CreateSMSL();
+    CleanupStack::PushL(sms);
 
-	if( iSms )
+	if( sms )
 		{
-		INFO_PRINTF1(_L("Sending SMS...") );
-		PrintMessageL(iSms);
-		SendSmsL(iSms,socket);				
+		SendSmsL(sms,socket);				
 		}
 	else
 		{
-		INFO_PRINTF1(_L("Error creating SMS.") );
-		TEST(EFalse);
+		INFO_PRINTF1(_L("Error creating SMS") );
+		SetTestStepResult(EFail);
 		}
-	
-	CleanupStack::PopAndDestroy(iSms);
-	socket.Close();
+
+    CleanupStack::PopAndDestroy(sms);
+	CleanupStack::PopAndDestroy(&socket);
 #endif	
 	return TestStepResult();
 	}
-//-----------------------------------------------------------------------------
-
-
-
-
-
-
-