//
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//


//! @SYMTestCaseID		CM-SENDAS-SMTP-CIT-0053-HP
//! @SYMTestCaseDesc		Negative Test - Attach an invalid text file with SMTP message
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		High
//! @SYMTestActions		Get base constants
//!				Create a session
//!				Reset the Message store for cleanup
//!				Create a POP3 account
//!				Create a SMTP service
//!				Create a client MTM Registry
//!				Create a SMTP MTM object
//!				Set default configuration and service parameters.
//!				Connect to SendAs2 server
//!				Get a SMTP MTM Uid
//!				Create a SMTP Message
//!				Add Recipitent
//!				Attach a invalid text file
//!				Save and close the server
//!				Disconnect the server
//! @SYMTestExpectedResults	Error code: -1 (The Attachment should not be added to Message with proper information)
//! @SYMTestType		CIT


RUN_UTILS DeleteFile c:\messaging.db
LOAD_SUITE MessagingTestServer -SharedData

PREFIX RUN_TEST_STEP 1000 MessagingTestServer
BEGIN_TEST_CASE
SETUP_TEST_CASE
GetBaseConstants		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	GetBaseConstants
CreateSession			c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CreateSession
ResetMessageStore		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	ResetMessageStore
CreatePopAccount		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CreatePopAccount
CheckChildrenCount		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	ChkChildrenCountDraft0
CreateSmtpService		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CreateSmtpService
CreateRegistry			c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CreateRegistry
CreateSmtpMtm			c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CreateSmtpMtm
SetDefaultConfiguration		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	SetDefaultConfig0
SetSmtpServiceParameters	c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	SetSmtpServiceParams
ChangeDefaultSmtpService 	c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	ChangeDfltSmtpService
EXECUTE_TEST_CASE
ConnectSendAsServer		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	ConnectSendAsServer
GetSMTPMTMUId  			c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	GetSmtpMtmUId
SendAsCreateMessageofType	c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CreateMessageofType
SendAsAddRecipient		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	SendAsAddRecipient
SendAsAddAttachment		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	SendAsAddAttachment
SendAsSaveMessageAndClose	c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CloseMessage
CloseSendAsServerConnection	c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CloseSvrConnection
CHECK_POSTCONDITIONS
CheckChildrenCount		c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	ChkChildrenCountDraft1
CheckErrorCode			c:\msgtest\TestFramework\ScriptedTestCases\SendAs\MSG-SENDAS-SMTP-CIT-0053-AddInvalidAttachment.ini	CheckErrorCode
END_TEST_CASE