//
// 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:
//
//! @file

RUN_UTILS DeleteFile c:\messaging.db

LOAD_SUITE 	T_MsgCommonServer  -SharedData
LOAD_SUITE 	T_MsgImapServer    -SharedData
LOAD_SUITE  	T_MsgSmtpServer    -SharedData


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0001
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0001
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyMailSelectionWhenAlreadyConnected) to copy from remote inbox to remote drafts
//!				11.	UnSubcribe the IMAP folder
//!				12.	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-DoFullImap4Synchronisation
// Invoke the IMAP4 client MTM copy command
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini      0001-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0001


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0002
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0002
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect) to copy from remote inbox to remote drafts
//!				10.	UnSubcribe the IMAP folder
//!				11.	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-DisConnectImap4Server
// Invoke the IMAP4 client MTM copy command
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini       0002-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0002


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0003
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0003
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline) to copy from remote inbox to remote drafts
//!				10.	UnSubcribe the IMAP folder
//!				11.	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini       0003-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0003


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0004
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0004
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyNewMailWhenAlreadyConnected) to copy from remote inbox to remote drafts
//!				11.	UnSubcribe the IMAP folder
//!				12.	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0004-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0004


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0005
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0005
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyNewMailAndStayOnline) to copy from remote inbox to remote drafts
//!				10.	UnSubcribe the IMAP folder
//!				11.	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0005-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0005


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0006
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0006
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyNewMailAndDisconnect) to copy from remote inbox to remote drafts
//!				10.	UnSubcribe the IMAP folder
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0006-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0006


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0007
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0007
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyAllMailWhenAlreadyConnected) to copy from remote inbox to remote drafts
//!				11.	UnSubcribe the IMAP folder
//!				12.	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0007-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0007


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0008
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0008
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyAllMailAndStayOnline) to copy from remote inbox to remote drafts
//!				10.	UnSubcribe the IMAP folder
//!				11.	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0008-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0008


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0009
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0009
//!	@SYMTestCaseDesc	Verification Test: Copying the message within Service(s)
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset the message store to clean up the central repository
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Subscribe IMAP folder and then perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyAllMailAndDisconnect) to copy from remote inbox to remote drafts
//!				10.	UnSubcribe the IMAP folder
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-CheckChildrenCountRemoteInbox_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-CheckChildrenCountRemoteDrafts_AfterCopy
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0009-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0009


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0010
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0010
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyMailSelectionWhenAlreadyConnected) to copy from remote inbox to local drafts
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0010-CheckChildrenCountDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0010


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0011
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0011
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect) to copy from remote inbox to local drafts
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-Imap4CopyAsyncFunction
//RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0011-CheckChildrenCountDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0011


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0012
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0012
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline) to copy from remote inbox to local drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0012-CheckChildrenCountDrafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini             0012-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0012


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0013
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0013
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyNewMailWhenAlreadyConnected) to copy from remote inbox to local drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0013-CheckChildrenCountDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0013


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0014
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0014
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyNewMailAndStayOnline) to copy from remote inbox to local drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0014-CheckChildrenCountDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0014


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0015
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0015
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyNewMailAndDisconnect) to copy from remote inbox to local drafts
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini           0015-CheckChildrenCountDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0015


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0016
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0016
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyAllMailWhenAlreadyConnected) to copy from remote inbox to remote drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-CheckChildrenCountDrafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0016-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0016


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0017
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0017
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyAllMailAndStayOnline) to copy from remote inbox to local drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-CheckChildrenCountDrafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0017-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0017


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0018
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0018
//!	@SYMTestCaseDesc	Verification Test: Copying the message from remote to local
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyAllMailAndDisconnect) to copy from remote inbox to local drafts
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to local drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-SendSmtpMessage_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-SendSmtpMessage_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0018-CheckChildrenCountDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0018


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0019
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0019
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyMailSelectionWhenAlreadyConnected) to copy from local inbox to remote drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0019-CheckChildrenCountRemoteDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0019


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0020
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0020
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect) to copy from local inbox to remote drafts
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0020-CheckChildrenCountRemoteDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0020


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0021
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0021
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline) to copy from local inbox to remote drafts
//!				10. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0021-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-CheckChildrenCountRemoteDrafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini             0021-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0021


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0022
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0022
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyNewMailWhenAlreadyConnected) to copy from local inbox to remote drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0022-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini              0022-CheckChildrenCountRemoteDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0022


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0023
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0023
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyNewMailAndStayOnline) to copy from local inbox to remote drafts
//!				10. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini              0023-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0023-CheckChildrenCountRemoteDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0023


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0024
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0024
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyNewMailAndDisconnect) to copy from local inbox to remote drafts
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0024-CheckChildrenCountRemoteDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0024


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0025
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0025
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMCopyAllMailWhenAlreadyConnected) to copy from local inbox to remote drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0025-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-CheckChildrenCountRemoteDrafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini             0025-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0025


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0026
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0026
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9. 	Connect to IMAP4 server
//!				10.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyAllMailAndStayOnline) to copy from local inbox to remote drafts
//!				11. 	Disconnect IMAP4 server
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-CheckChildrenCountRemoteDrafts
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0026-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer		ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer		ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0026


START_TESTCASE MSG-IMAP-COPYMSG-CMD-0027
//!	@SYMTestCaseID		MSG-IMAP-COPYMSG-CMD-0027
//!	@SYMTestCaseDesc	Verification Test: Copying the message from local to remote
//!
//!	General descriptions: 
//!	=============================
//!		A client should be able to copy any message, or a selection of messages, from an IMAP service to 
//!	the local device or from the local device to the remote service, by invoking client MTM command
//!
//!	Client MTM Command:
//!	===========================
//!				KIMAP4MTMCopyMailSelectionWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect
//!				KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline
//!				KIMAP4MTMCopyNewMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyNewMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyNewMailAndDisconnect
//!				KIMAP4MTMCopyAllMailWhenAlreadyConnected
//!				KIMAP4MTMConnectAndCopyAllMailAndStayOnline
//!				KIMAP4MTMConnectAndCopyAllMailAndDisconnect
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!  	
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5574 
//!
//!	@SYMAPI 		CMsvEntrySelection::AppendL()
//!				CMsvEntrySelection::ResizeL()
//!				CMsvEntrySelection::InsertL()
//!				CImap4ClientMtm::InvokeAsyncFunctionL()
//!					
//!	@SYMComponent 		IMAP Protocol Controller 
//!				
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions		1.	Initialise the RAS connection
//!				2. 	Reset Message Store and Central Repository to default state
//!				3. 	Create an IMAP account by reading the settings from the file
//!				4. 	Connect to IMAP4 server
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state.
//!				6. 	Do perform full sync
//!				7. 	Disconnect IMAP4 server
//!				8. 	Create two SMTP Messages and then send it to server
//!				9.	Invoke the IMAP4 client MTM copy command(KIMAP4MTMConnectAndCopyAllMailAndDisconnect) to copy from local inbox to remote drafts
//!
//!	@SYMTestExpectedResults	All the message suppose to be copied to remote drafts
//!	@SYMAuthor		Rajat Bal

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP 300 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-CreateImapAccount
RUN_TEST_STEP 300 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-ChangeSubAndSyncSettings
RUN_TEST_STEP 300 T_MsgImapServer	ConnectAndSyncImapServer	c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-ConnectAndSyncImapServer
RUN_TEST_STEP 300 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-InitialiseImap4Account
RUN_TEST_STEP 300 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-SubscribeImapFolder_Drafts
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 300 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	Imap4CopyAsyncFunction		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-Imap4CopyAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\message\msg-imap-message1.ini            0027-CheckChildrenCountRemoteDrafts

RUN_TEST_STEP	300	T_MsgCommonServer	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer	ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer	ShutDown

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-COPYMSG-CMD-0027


START_TESTCASE	MSG-IMAP-DELMSG-0001
//!	@SYMTestCaseID			MSG-IMAP-DELMSG-0001
//!	@SYMTestCaseDesc		Verification:
//!					This Testcase tests delete operation in online mode. This will test deletion on Inbox
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialise the RAS connection
//!					Reset the message store to clean up the central repository
//!					Create an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connect to the IMAP server and performs full sync with IMAP4 server.
//!					Initialises Imap account
//!					Create messages from RFC822 file and sends the messages to the same IMAP account.
//!					Set the full download limits.
//!					Download Limits:
//!						MaxEmailSize = Default( KMaxInt)
//!						ImapMailOption = TImap4GetMailOptions::EGetImap4EmailBodyTextAndAttachments
//!					DoFullSynchronisation
//!					Delete the (1) message from specified folder(Inbox)
//!					Do Full synchronisation
//!					Check the message is deleted from the Inbox.
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass,The (1) message received has been deleted from Inbox.
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5576
//!	@SYMPREQ			1160


PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP	300	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-CheckChildrenCountRemoteInbox1
//Deleting Message
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-DeleteMessage
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-DoFullImap4Synchronisation
//Check the Messages are deleted
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0028-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer   	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer	ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer	ShutDown

PRINT Execute Completed ################################################
END_TESTCASE	MSG-IMAP-DELMSG-0001


START_TESTCASE	MSG-IMAP-DELMSG-0002
//!	@SYMTestCaseID			MSG-IMAP-DELMSG-0002
//!	@SYMTestCaseDesc		Verification:
//!					This Testcase tests Multiple Deletion of Messages when connected to Imap Server
//!					This test will test deletion on Inbox
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialise the RAS connection
//!					Reset the message store to clean up the central repository
//!					Create an IMAP account
//!					Connect to the IMAP server 
//!					Perform full sync with IMAP4 server.
//!					Initialises Imap Account
//!					Disconnect
//!					Create multiple messages from RFC822 file and sends the messages to the same IMAP account.
//!					Set the full download limits.
//!					Download Limits:
//!						MaxEmailSize = Default( KMaxInt)
//!						ImapMailOption = TImap4GetMailOptions::EGetImap4EmailBodyTextAndAttachments
//!					Connect to the Imap Server
//!					Download the mails
//!					Check the Children Count on Imap remote Folder
//!					Delete (5) Messages from specified Folder(Inbox)
//!					Do full Synchronisation
//!					Check the messages are deleted from Inbox.
//!	@SYMTestExpectedResults		EPass, (5) Messages are deleted from the specified(Inbox) folder.
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5576
//!	@SYMPREQ			1160

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP	300	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CreateSmtpMessageFromEmailFile2
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CreateSmtpMessageFromEmailFile3
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CreateSmtpMessageFromEmailFile4
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CheckChildrenCountOutbox5
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-DoFullImap4Synchronisation
RUN_TEST_STEP	300	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CheckChildrenCountRemoteInbox5
//Deleting Messages
RUN_TEST_STEP  	300 	T_MsgImapServer		DeleteAllImapChildren 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-DeleteAllImapChildren
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-DoFullImap4Synchronisation
//Chking if the messages are deleted
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0029-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer   	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer	ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer	ShutDown

PRINT Execute Completed ################################################
END_TESTCASE	MSG-IMAP-DELMSG-0002


START_TESTCASE	MSG-IMAP-DELMSG-0004
//!	@SYMTestCaseID			MSG-IMAP-DELMSG-0004
//!	@SYMTestCaseDesc		Verification:
//!					This Testcase tests if message in drafts folder is deleted when connected to ImapServer
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialise the RAS connection
//!					Reset the message store to clean up the central repository
//!					Create an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connect to the IMAP server and performs full sync with IMAP4 server.
//!					Initialises Imap Account
//!					Create messages from RFC822 file and sends the messages to the same IMAP account.
//!					Set the full download limits.
//!					Download Limits:
//!						MaxEmailSize = Default( KMaxInt)
//!						ImapMailOption = TImap4GetMailOptions::EGetImap4EmailBodyTextAndAttachments
//!					DoFullSynchronisation
//!					Disconnect
//!					Now Move the mails to "Drafts"
//!					Connect
//!					Download the mails with IMAP4 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline command
//!					and compares the received messages with sent messages based on the Download limits set.
//!					Delete the (1) message from the specified folder(Drafts)
//!					Do Full synchronisation
//!					Check the message is deleted from the "Drafts" folder.
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass, (1) Message is deleted from the specified(drafts) folder.
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5576
//!	@SYMPREQ			1160

PRINT Setup Begins #####################################################

RUN_TEST_STEP	300	T_MsgCommonServer  	StartUp
RUN_TEST_STEP	300	T_MsgImapServer	StartUp
RUN_TEST_STEP	300	T_MsgSmtpServer	StartUp

RUN_TEST_STEP	300	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CheckChildrenCountRemoteInbox
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-SubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CheckChildrenCountRemoteInbox1
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DisConnectImap4Server
//Moving Message to Drafts folder
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-MoveMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-ImapInvokeAsyncFunction
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CheckChildrenCountRemoteDrafts1
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CheckChildrenCountRemoteInbox
//Deleting Message from Drafts folder
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DeleteMessage
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
//Chking whether the message is being deleted
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-CheckChildrenCountRemoteDrafts0
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\message\msg-imap-message1.ini           		0030-DisConnectImap4Server

RUN_TEST_STEP	300	T_MsgCommonServer   	ShutDown
RUN_TEST_STEP	300	T_MsgImapServer	ShutDown
RUN_TEST_STEP	300	T_MsgSmtpServer	ShutDown

PRINT Execute Completed ################################################
END_TESTCASE	MSG-IMAP-DELMSG-0004

