//
// 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


//#####Script MSG-IMAP-OFFLINE-DELFOLDER-0011 has been commented out. ##########################
//#####Imitating the onb winscw run ########
// START_TESTCASE	MSG-IMAP-OFFLINE-DELFOLDER-0011
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELFOLDER-0011
//!	@SYMTestCaseDesc		This Test Deletes Single Message
//!	@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.
//!					Delete all mails in the Inbox on the server.
//!					Sync
//!					Disconnect
//!					Create Folder
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Disconnect
//!					Delete Folder
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Disconnect
//!					Create Folder
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Disconnect
//!					Delete Folder
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Disconnect
//!					Check the folder should is deleted
//!	@SYMTestExpectedResults		EPass,The folder should be deleted. It should be deleted from the Imap Server too.
//!	@SYMAuthor			Mrudul Pendharkar

//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\offline\msg-imap-offline2.ini    		0001-InitNtRas
//RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-ResetMessageStore
//RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-CreateImapAccount 
//RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-ConnectImap4Server
//RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DoFullImap4Synchronisation
//RUN_TEST_STEP  	300 	T_MsgImapServer		DeleteAllImapChildren 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DeleteAllImapChildren
//RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-CheckChildrenCountRemoteInbox0
//RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DisConnectImap4Server
//PRINT Setup Completed
//PRINT Execute begins
//RUN_TEST_STEP	300	T_MsgImapServer		CreateImap4Folder			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-CreateImap4Folder
//RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-ConnectImap4Server
//RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DoFullImap4Synchronisation
//RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DisConnectImap4Server
//RUN_TEST_STEP	300	T_MsgImapServer		DeleteImap4Folder			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DeleteImap4Folder
//RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-ConnectImap4Server
//RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DoFullImap4Synchronisation
//RUN_TEST_STEP  	300 	!Error=-1 T_MsgImapServer		FindEntrybyName 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-FindEntrybyName
//RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DisConnectImap4Server
//RUN_TEST_STEP	300	T_MsgImapServer		CreateImap4Folder			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-CreateImap4Folder
//RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-ConnectImap4Server
//RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DoFullImap4Synchronisation
//RUN_TEST_STEP	300	T_MsgImapServer		DeleteImap4Folder			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DeleteImap4Folder
//RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DisConnectImap4Server
//RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-ConnectImap4Server
//RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-DoFullImap4Synchronisation
//RUN_TEST_STEP  	300 	!Error=-1 T_MsgImapServer		FindEntrybyName 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0001-FindEntrybyName
//RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELFOLDER-0011


START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0001
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0001
//!	@SYMTestCaseDesc		This test script creates a RFC822 message
//!					& sends the message to the same account.
//!					It then receives the message, by full syncronisation with Pop account.
//!					The recieved message is then deleted while offline(not connected).
//!					It then connects to Imap server and synchronises the offline folder to 
//!					delete the copy of message on Imap Server
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialises the RAS connection
//!					Resets the message store to clean up the central repository
//!					Creates an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connects to the IMAP server and performs full sync with IMAP4 server.
//!					Connects to the IMAP server and deletes all mails in the Inbox on the server.
//!					Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					Sets the full download limits.
//!					Download the mails with IMAP4 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline command
//!					and compares the received messages with sent messages based on the Download limits set.
//!					Disconnect from the server
//!					Delete the message from specified folder(Inbox)
//!					Connect to the Imap Server
//!					Do Full synchronisation
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass,The message received has been deleted from the Imap server also.
//!	@SYMAuthor			Mrudul V. Pendharkar

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\offline\msg-imap-offline2.ini    		0002-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-CheckChildrenCountRemoteInbox1
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-DeleteMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0002-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0001



START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0002
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0002
//!	@SYMTestCaseDesc		Verification:
//!					This Test tests Deletion of Multiple Messages in Offline Mode 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 The Imap Account
//!					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
//!					Disconnect from the Imap Server
//!					Delete (5)Messages from specified Folder(Inbox)
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Check the (5)messages are deleted.
//!	@SYMTestExpectedResults		EPass,(5)Messages are deleted from the specified(Inbox) folder (as well as from ImapServer if the messages are in RemoteImapFolder)
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0003-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CreateSmtpMessageFromEmailFile2
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CreateSmtpMessageFromEmailFile3
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CreateSmtpMessageFromEmailFile4
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CheckChildrenCountOutbox5
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-DoFullImap4Synchronisation
RUN_TEST_STEP	300	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CheckChildrenCountRemoteInbox5
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-DisConnectImap4Server
//Offline Delete Operation
RUN_TEST_STEP  	300 	T_MsgImapServer		DeleteAllImapChildren 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-DeleteAllImapChildren
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-DoFullImap4Synchronisation
//Check if the Messages are deleted
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0003-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0002



START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0004
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0004
//!	@SYMTestCaseDesc		Verification:
//!					This Test tests deletion of Message in Offline Mode on Drafts folder.
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialises the RAS connection
//!					Resets the message store to clean up the central repository
//!					Creates an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connects to the IMAP server and performs full sync with IMAP4 server.
//!					Initialises The Imap Account
//!					Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					Sets the full download limits.
//!						Download Limits:
//!						MaxEmailSize = Default (KMaxInt)
//!						ImapMailOption = TImap4GetMailOptions::EGetImap4EmailBodyTextAndAttachments
//!					Download the mails with IMAP4 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline command
//!					and compares the received messages with sent messages based on the Download limits set.
//!					Now Move the mails to "Drafts"
//!					Disconnect from the server
//!					Delete the (1)message from the specified folder(Drafts)
//!					Connect to the Imap Server
//!					Do Full synchronisation
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass,The (1)message received has been deleted from the Imap server also.
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0004-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-SubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CheckChildrenCountRemoteInbox1
//Move Msg to Drafts Folder
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-MoveMessage
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CheckChildrenCountRemoteDrafts1
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DisConnectImap4Server
//Offline Delete
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DeleteMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-ConnectImap4Server
PRINT About to Sync The Offline Deletes.........
// Deleting the online copy of the message that has been marked for delete offline.
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-CheckChildrenCountRemoteDrafts0
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0004-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0004




START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0005
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0005
//!	@SYMTestCaseDesc		Verification:
//!					This Test tests Deletion of Multiple Messages in Offline Mode on Drafts folder
//!	@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 The Imap Account
//!					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
//!					Now Move the mails to "Drafts"
//!					Check the Children Count on Imap remote Folder
//!					Disconnect from the Imap Server
//!					Delete (5)Messages from specified Folder (Drafts)
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Check the messages are deleted.
//!	@SYMTestExpectedResults		EPass,(5)Messages are deleted from the specified(Drafts) folder (as well as from ImapServer if the messages are in RemoteImapFolder)
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    	0005-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CreateSmtpMessageFromEmailFile2
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CreateSmtpMessageFromEmailFile3
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CreateSmtpMessageFromEmailFile4
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CheckChildrenCountOutbox5
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-SubscribeImapFolder_Drafts
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DoFullImap4Synchronisation
RUN_TEST_STEP	300	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CheckChildrenCountRemoteInbox5
//Move Msgs to Drafts Folder
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-MoveMessage1
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-MoveMessage2
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-MoveMessage3
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-MoveMessage4
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-MoveMessage5
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CheckChildrenCountRemoteDrafts5
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DisConnectImap4Server
//Offline Delete Msgs
RUN_TEST_STEP  	300 	T_MsgImapServer		DeleteAllImapChildren 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DeleteAllImapChildrenDrafts
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-CheckChildrenCountRemoteDrafts0
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0005-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0005





START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0006
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0006
//!	@SYMTestCaseDesc		Verification:
//!					This Test tests deletion of Message in Offline Mode on Sent Items
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialises the RAS connection
//!					Resets the message store to clean up the central repository
//!					Creates an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connects to the IMAP server and performs full sync with IMAP4 server.
//!					Initialises The Imap Account
//!					Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					Sets the full download limits.
//!						Download Limits:
//!						MaxEmailSize = Default (KMaxInt)
//!						ImapMailOption = TImap4GetMailOptions::EGetImap4EmailBodyTextAndAttachments
//!					Download the mails with IMAP4 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline command
//!					and compares the received messages with sent messages based on the Download limits set.
//!					Now Move the mail to "Sent Items"
//!					Disconnect from the server
//!					Delete the (1)message from specified folder(Sent Items)
//!					Connect to the Imap Server
//!					Do Full synchronisation
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass,The (1)message received has been deleted from the Imap server also.
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0006-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-SubscribeImapFolder_Sent
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CheckChildrenCountRemoteInbox1
//Move Message to Sent Items
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-MoveMessage
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CheckChildrenCountRemoteSent1
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DisConnectImap4Server
//Offline delete Message
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DeleteMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-DoFullImap4Synchronisation
//Check the Message is deleted
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-CheckChildrenCountRemoteSent0
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0006-UnsubscribeImapFolder_Sent
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0006


START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0007
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0007
//!	@SYMTestCaseDesc		Verification:
//!					This Test tests Deletion of Multiple Messages in Offline Mode
//!					This test will test deletion of Multiple Message on Sent Items
//!	@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 The Imap Account
//!					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
//!					Now Move the mails(5) to "Sent Items"
//!					Check the Children Count on Imap remote Folder
//!					Disconnect from the Imap Server
//!					Delete Messages(5) from specified Folder ( Sent Items)
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Check the messages are deleted.
//!	@SYMTestExpectedResults		EPass,Messages(5) are deleted from the specified(Sent Items) folder (as well as from ImapServer if the messages are in RemoteImapFolder)
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0007-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CreateSmtpMessageFromEmailFile2
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CreateSmtpMessageFromEmailFile3
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CreateSmtpMessageFromEmailFile4
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CheckChildrenCountOutbox5
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-SubscribeImapFolder_Sent
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DoFullImap4Synchronisation
RUN_TEST_STEP	300	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CheckChildrenCountRemoteInbox5
//Move Messages to Sent Items
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-MoveMessage1
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-MoveMessage2
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-MoveMessage3
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-MoveMessage4
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-MoveMessage5
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CheckChildrenCountRemoteSent5
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DisConnectImap4Server
//Offline delete Messages
RUN_TEST_STEP  	300 	T_MsgImapServer		DeleteAllImapChildren 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DeleteAllImapChildrenSent
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-DoFullImap4Synchronisation
//Check the Messages are deleted
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-CheckChildrenCountRemoteSent0
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0007-UnsubscribeImapFolder_Sent
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0007



START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0008
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0008
//!	@SYMTestCaseDesc		Verification:
//!					This Test tests deletion of Message in Offline Mode on a UserDefined Folder
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialises the RAS connection
//!					Resets the message store to clean up the central repository
//!					Creates an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connects to the IMAP server and performs full sync with IMAP4 server.
//!					Connects to the IMAP server and deletes all mails in the Inbox on the server.
//!					Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					Sets the full download limits.
//!						Download Limits:
//!						MaxEmailSize = Default (KMaxInt)
//!						ImapMailOption = TImap4GetMailOptions::EGetImap4EmailBodyTextAndAttachments
//!					Download the mails with IMAP4 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline command
//!					and compares the received messages with sent messages based on the Download limits set.
//!					Now Move the mail to "MyFolder"
//!					Disconnect from the server
//!					Delete the (1)message ( MyFolder)
//!					Connect to the Imap Server
//!					Do Full synchronisation
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass,The (1)message received has been deleted from user Folder(MyFolder) & the Imap server also.
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0008-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CreateImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CreateImap4Folder
RUN_TEST_STEP  	300 	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-SubscribeImap4Folder
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CheckChildrenCountRemoteMyFolder
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-ImapInvokeAsyncFunction
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CheckChildrenCountRemoteInbox1
//Move Message to MyFolder
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-MoveMessage
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CheckChildrenCountRemoteMyFolder1
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DisConnectImap4Server
//Offline Delete Message
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DeleteMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-ConnectImap4Server
// 1st sync sends the offline delete to the server (store flags, expunge)
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DoFullImap4Synchronisation
// 2nd sync receives the delete information and removes the local copy
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0008-CheckChildrenCountRemoteMyFolder
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0008


START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0009
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0009
//!	@SYMTestCaseDesc		Verification:
//!					This Test tests Deletion of Multiple Messages in Offline Mode on UserDefined Folder
//!	@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 The Imap Account
//!					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
//!					Create folder Named "MyFolder" under Inbox
//!					Download the mails
//!					Now Move the mails to "MyFolder"
//!					Check the Children Count on Imap remote Folder
//!					Disconnect from the Imap Server
//!					Delete (5)Messages from specified Folder (MyFolder)
//!					Connect to the Imap Server
//!					Do full Synchronisation
//!					Check the messages are deleted.
//!	@SYMTestExpectedResults		EPass,(5)Messages are deleted from the specified(MyFolder) folder (as well as from ImapServer if the messages are in RemoteImapFolder)
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0009-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CreateImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CreateImap4Folder
RUN_TEST_STEP  	300 	T_MsgImapServer		FindEntryByName 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-FindEntryByName
RUN_TEST_STEP  	300 	T_MsgImapServer		DeleteAllImapChildren 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DeleteAllImapChildrenMyFolder
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CheckChildrenCountRemoteMyFolder
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CreateSmtpMessageFromEmailFile2
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CreateSmtpMessageFromEmailFile3
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CreateSmtpMessageFromEmailFile4
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CheckChildrenCountOutbox5
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-SubscribeImapFolder_MyFolder
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DoFullImap4Synchronisation
RUN_TEST_STEP	300	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CheckChildrenCountRemoteInbox5
//Move Messages to MyFolder
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-MoveMessage1
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-MoveMessage2
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-MoveMessage3
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-MoveMessage4
RUN_TEST_STEP  	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-MoveMessage5
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CheckChildrenCountRemoteMyFolder5
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DisConnectImap4Server
//Offline Delete Messages
RUN_TEST_STEP  	300 	T_MsgImapServer		DeleteAllImapChildren 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DeleteAllImapChildrenMyFolder
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-DoFullImap4Synchronisation
//check Messsages are deleted
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-CheckChildrenCountRemoteMyFolder
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0009-UnsubscribeImapFolder_MyFolder
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-DELMSG-0009



START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0010
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0010
//!	@SYMTestCaseDesc		Negative:
//!					This Test tests whether delete on nonexistant message causes imap code to respond erratically
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialises the RAS connection
//!					Resets the message store to clean up the central repository
//!					Creates an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connects to the IMAP server and performs full sync with IMAP4 server.
//!					Initialises The Imap Account
//!					Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					Sets the full download limits.
//!						Download Limits:
//!						MaxEmailSize = Default (KMaxInt)
//!						ImapMailOption = TImap4GetMailOptions::EGetImap4EmailBodyTextAndAttachments
//!					Download the mails with IMAP4 command
//!					and compares the received messages with sent messages based on the Download limits set.
//!					Disconnect from the server
//!					Delete the message(Non Existant Message)
//!					Connect to the Imap Server
//!					Do Full synchronisation
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass,The delete Operation should fail with -1(NotFound)
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0010-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-CheckChildrenCountRemoteInbox1
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-DisConnectImap4Server
//Delete a NonExistant Message
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-DeleteMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-CheckChildrenCountRemoteInbox1
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0010-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-OFFLINE-DELMSG-0010



START_TESTCASE	MSG-IMAP-OFFLINE-DELMSG-0011
//!	@SYMTestCaseID			MSG-IMAP-OFFLINE-DELMSG-0011
//!	@SYMTestCaseDesc		Negative:
//!					This Test tests if two deletes on same Message in Offline Mode, succeeds or not, when connected
//!	@SYMTestPriority		HIGH
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			Initialises the RAS connection
//!					Resets the message store to clean up the central repository
//!					Creates an IMAP account by reading the settings from the file mentioned
//!					thus setting the IMAP and SMTP service settings
//!					Connects to the IMAP server and performs full sync with IMAP4 server.
//!					Connects to the IMAP server and deletes all mails in the Inbox on the server.
//!					Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					Sets the full download limits.
//!					Download the mails with IMAP4 command
//!					and compares the received messages with sent messages based on the Download limits set.
//!					Disconnect from the server
//!					Delete the message
//!					Delete the Message( Already deleted message)
//!					Connect to the Imap Server
//!					Do Full synchronisation
//!					Disconnect from the Server
//!	@SYMTestExpectedResults		EPass,The message received has been deleted from Inbox & the Imap server also. Also The second deletion should not fail.
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5581
//!	@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\offline\msg-imap-offline2.ini    		0011-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-ImapInvokeAsyncFunction
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-CheckChildrenCountRemoteInbox1
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DisConnectImap4Server
//Delete Message Offline
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DeleteMessage
//Delete Same Message
RUN_TEST_STEP 	300 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DeleteMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0011-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-OFFLINE-DELMSG-0011


START_TESTCASE	MSG-IMAP-OFFLINE-MOVEMSG-0001
//!	@SYMTestCaseID		MSG-IMAP-OFFLINE-MOVEMSG-0001
//!	@SYMTestCaseDesc	Verification Test: Moving the message from local Inbox to remote drafts (offline)
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5580
//!
//!	@SYMAPI 		CMsvEntry::MoveL()
//!					
//!	@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 the 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 a message and send the message to account
//!				9. 	Move this message from the local inbox to remote drafts
//!				10. 	Connect to IMAP server using account settings and then perform full sync
//!				11.	Disconnect IMAP4 Server
//!
//!	@SYMTestExpectedResults	The message suppose to be moved to the 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\offline\msg-imap-offline2.ini    	0012-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-CreateImapAccount 
RUN_TEST_STEP	300	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-ChangeSubAndSyncSettings
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-ConnectAndSyncImapServer
RUN_TEST_STEP	300	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-InitialiseImap4Account
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-SubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-CheckChildrenCountRemoteDrafts_0
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-MoveMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-CheckChildrenCountRemoteDrafts
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0012-CheckChildrenCountLocalInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-MOVEMSG-0001


START_TESTCASE	MSG-IMAP-OFFLINE-MOVEMSG-0002
//!	@SYMTestCaseID		MSG-IMAP-OFFLINE-MOVEMSG-0002
//!	@SYMTestCaseDesc	Negative Test: Moving the message from local Inbox to nonexisting folder (offline)
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5579
//!
//!	@SYMAPI 		CMsvEntry::CopyL()
//!					
//!	@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 'A' by reading the settings from the file
//!				4. 	Connect to the IMAP4 server using account 'A' and perform a full sync
//!				5.	Disconnect the IMAP server
//!
//!				6. 	Create an another IMAP account 'B' by reading the settings from the file
//!				7. 	Connect to the IMAP4 server using account 'B' and performs a full sync 
//!				8.	Disconnect the IMAP server
//!
//!				9. 	Connect to the IMAP4 server using account 'A' 
//!				10.	Creates a new folder 
//!				11.	Disconnect the IMAP server
//!
//!				12.	Connect to the IMAP server using account 'B' 
//!				13.	Delete the folder which was created by account 'A'
//!				14.	Disconnect the IMAP server
//!					
//!				15.	Create a Message in local inbox using account 'A'
//!				16.	MOve the message from the local inbox to the nonexisting folder using account 'A'(offline operation).
//!					
//!				17.	Connect to the IMAP4 server using account 'A' and perform a full sync
//!				18.	Confirm message still exists in local inbox
//!				19.	Disconnect the IMAP server
//!
//!	@SYMTestExpectedResults	Should not be moved to the nonexisting folder				
//!	@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\offline\msg-imap-offline2.ini    		0013-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-ResetMessageStore
// Create Account A 
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-CreateImapAccount_A
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-ConnectImap4Server_A
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DoFullImap4Synchronisation_A
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DisConnectImap4Server_A
// Create Account B
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-CreateImapAccount_B
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-ConnectImap4Server_B
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DoFullImap4Synchronisation_B
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DisConnectImap4Server_B
// Create folder using Account A
RUN_TEST_STEP	300	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-ConnectAndSyncImapServer_A
RUN_TEST_STEP	300	T_MsgImapServer		CreateImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-CreateImap4Folder_A
RUN_TEST_STEP	300	T_MsgImapServer		FindEntryByName			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-FindEntryByName_A
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DisConnectImap4Server_A
// Delete folder using Account B
RUN_TEST_STEP	300	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-ConnectAndSyncImapServer_B
RUN_TEST_STEP 	300	T_MsgImapServer		DeleteImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DeleteImap4Folder_B
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DisConnectImap4Server_B
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-CreateSmtpMessageFromEmailFile_A
// Move the Message to Non existing folder
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-MoveMessage_A
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-SetImap4FullDownloadLimits_A
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-ConnectImap4Server_A
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DoFullImap4Synchronisation_A
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-CheckChildrenCountLocal_Inbox_A
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0013-DisConnectImap4Server_A

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-OFFLINE-MOVEMSG-0002



START_TESTCASE	MSG-IMAP-OFFLINE-MOVEMSG-0003
//!	@SYMTestCaseID		MSG-IMAP-OFFLINE-MOVEMSG-0003
//!	@SYMTestCaseDesc	Verification Test: Moving multiple messages from local Inbox to remote drafts (offline)
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5579
//!
//!	@SYMAPI 		CMsvEntry::MoveL()
//!					
//!	@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 the 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 multiple messages and send these messages 
//!				9. 	Move these messages from the local inbox to remote drafts
//!				10. 	Connect to IMAP server using account settings and then perform full sync
//!				13.	Unsubscribe IMAP folders
//!				14.	Disconnect IMAP4 Server
//!
//!	@SYMTestExpectedResults	All The messages suppose to be moved to the 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\offline\msg-imap-offline2.ini    		0014-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-CreateImapAccount 
RUN_TEST_STEP	300	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-ChangeSubAndSyncSettings
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-ConnectAndSyncImapServer
RUN_TEST_STEP	300	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-InitialiseImap4Account
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-SubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-CheckChildrenCountRemote
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-CreateSmtpMessageFromEmailFileOne
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-CreateSmtpMessageFromEmailFileTwo
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-MoveMessageOne
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-MoveMessageTwo
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-CheckChildrenCountLocalInbox
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-CheckChildrenCountRemoteDrafts
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0014-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-OFFLINE-MOVEMSG-0003


START_TESTCASE	MSG-IMAP-OFFLINE-MOVEMSG-0004
//!	@SYMTestCaseID		MSG-IMAP-OFFLINE-MOVEMSG-0004
//!	@SYMTestCaseDesc	Verification Test: Moving multiple messages from local Inbox to user defined folders (offline)
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5579
//!
//!	@SYMAPI 		CMsvEntry::MoveL()
//!					
//!	@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 the IMAP4 server and perform a full sync 
//!				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 multiple message 
//!
//!				9. 	Connect to the IMAP4 server and perform a full sync 
//!				10. 	Create some folders under drafts, inbox and sent item and then subscribe these
//!				11. 	Disconnect IMAP4 server
//!
//!				12. 	Move these messages from the local inbox to user defined folders
//!				13. 	Connect to IMAP server using account settings and then perform full sync
//!				14.	Unsubscribe IMAP folders
//!				15.	Disconnect IMAP4 Server
//!
//!	@SYMTestExpectedResults	All The messages suppose to be moved to the user defined folders				
//!	@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\offline\msg-imap-offline2.ini    	0015-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CreateImapAccount 
RUN_TEST_STEP	300	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-ChangeSubAndSyncSettings
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-ConnectAndSyncImapServer
RUN_TEST_STEP	300	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-InitialiseImap4Account
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-SubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-SubscribeImapFolder_SentItems
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountRemoteInbox
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountRemoteSentItems
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountRemoteDrafts
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-MessageWithZeroByteAttchmnt
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-MessageWithContactCard
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-MessageWithAttchmntAndNoBody
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountLocalInboxBeforeMove
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImap4Folder 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CreateImap4Folder_UnderDraft
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImap4Folder 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CreateImap4Folder_UnderSent
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImap4Folder 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CreateImap4Folder_UnderInbox
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-SubscribeImapFolder_UnderDraft
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-SubscribeImapFolder_UnderSent
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-SubscribeImapFolder_UnderInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-MoveMessage1
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-MoveMessage2
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage	 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-MoveMessage3
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountLocalInboxAfterMove
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountRemoteUnderDraft
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountRemoteUnderSent
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-CheckChildrenCountRemoteUnderInbox
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-UnsubscribeImapFolder_UnderDraft
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-UnsubscribeImapFolder_UnderSent
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-UnsubscribeImapFolder_UnderInbox
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-UnsubscribeImapFolder_SentItems
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0015-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-OFFLINE-MOVEMSG-0004


START_TESTCASE	MSG-IMAP-OFFLINE-MOVEMSG-0005
//!	@SYMTestCaseID		MSG-IMAP-OFFLINE-MOVEMSG-0005
//!	@SYMTestCaseDesc	Verification Test: Moving the message from remote Inbox to local drafts (offline)
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5579
//!
//!	@SYMAPI 		CMsvEntry::MoveL()
//!					
//!	@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 the IMAP4 server 
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state and then perform a full sync
//!				6. 	Disconnect IMAP4 server
//!				7. 	Create a message and send the message
//!				8. 	Move this message from the remote inbox to local drafts
//!				9. 	Connect to IMAP server using account settings and then perform full sync
//!				10.	Disconnect IMAP4 Server
//!
//!	@SYMTestExpectedResults	The message suppose to be moved to the 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\offline\msg-imap-offline2.ini    		0016-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-CreateImapAccount 
RUN_TEST_STEP	300	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-ChangeSubAndSyncSettings
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-ConnectAndSyncImapServer
RUN_TEST_STEP	300	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-InitialiseImap4Account
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-CheckChildrenCountRemoteInbox1
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-MoveMessage
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    		0016-CheckChildrenCountDrafts
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-MOVEMSG-0005


START_TESTCASE	MSG-IMAP-OFFLINE-MOVEMSG-0006
//!	@SYMTestCaseID		MSG-IMAP-OFFLINE-MOVEMSG-0006
//!	@SYMTestCaseDesc	Verification Test: Moving multiple messages from remote Inbox to local drafts (offline)
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5579
//!
//!	@SYMAPI 		CMsvEntry::MoveL()
//!					
//!	@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 the IMAP4 server 
//!				5. 	Initialise IMAP account on remote IMAP4 server to the default clean state and then perform a full sync
//!				6. 	Disconnect IMAP4 server
//!				7. 	Create multiple messages and send these messages
//!				8. 	Move these messages from the remote inbox to local drafts
//!				9. 	Connect to IMAP server using account settings and then perform full sync
//!				10.	Disconnect IMAP4 Server
//!
//!	@SYMTestExpectedResults	The message suppose to be moved to the 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\offline\msg-imap-offline2.ini    	0017-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CreateImapAccount 
RUN_TEST_STEP	300	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-ChangeSubAndSyncSettings
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-ConnectAndSyncImapServer
RUN_TEST_STEP	300	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-InitialiseImap4Account
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-SendSmtpMessage1
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CheckChildrenCountRemoteInbox1
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-DisConnectImap4Server
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-MoveMessageOne
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-MoveMessageTwo
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0017-CheckChildrenCountDrafts
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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-OFFLINE-MOVEMSG-0006


START_TESTCASE	MSG-IMAP-OFFLINE-MOVEMSG-0007
//!	@SYMTestCaseID		MSG-IMAP-OFFLINE-MOVEMSG-0007
//!	@SYMTestCaseDesc	Verification Test: Moving multiple messages from remote Inbox to remote drafts and sent items (offline)
//!
//!	@SYMTestPriority	Critical
//!   	@SYMTestType		CIT
//!  	@SYMTestStatus		Implemented
//!
//!	@SYMPREQ 		PREQ1160
//!	@SYMREQ			REQ5579
//!
//!	@SYMAPI 		CMsvEntry::MoveL()
//!					
//!	@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 the 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 multiple messages and send these messages
//!				9. 	Move these messages from the remote inbox to remote folders
//!				10. 	Connect to IMAP server using account settings and then perform full sync
//!				11.	Disconnect IMAP4 Server
//!
//!	@SYMTestExpectedResults	The message suppose to be moved to the remote folders (drafts and sent items)				
//!	@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\offline\msg-imap-offline2.ini    	0018-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CreateImapAccount
RUN_TEST_STEP	300	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-ChangeSubAndSyncSettings
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectAndSyncImapServer	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-ConnectAndSyncImapServer
RUN_TEST_STEP	300	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-InitialiseImap4Account
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-SubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		SubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-SubscribeImapFolder_SentItems
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CheckChildrenCountRemote_Inbox
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CheckChildrenCountRemote_Drafts
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CheckChildrenCountRemote_SentItems
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-SendSmtpMessage1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CreateSmtpMessageFromEmailFile2
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-SendSmtpMessage2
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-SetImap4FullDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-DoFullImap4Synchronisation
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CheckChildrenCountRemoteInbox_BeforeMoveOps
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-DisConnectImap4Server
// Move Message WithInServices
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-MoveMessage1
RUN_TEST_STEP 	300 	T_MsgImapServer		MoveMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-MoveMessage2
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-DoFullImap4Synchronisation
// Check All the Target folders
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CheckChildrenCountRemoteInbox_AfterMoveOps
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CheckChildrenCountRemoteDrafts_AfterMoveOps
RUN_TEST_STEP  	300 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-CheckChildrenCountRemoteSentItems_AfterMoveOps
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP	300	T_MsgImapServer		UnsubscribeImap4Folder		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-UnsubscribeImapFolder_SentItems
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0018-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-OFFLINE-MOVEMSG-0007



START_TESTCASE MSG_IMAP_Offline_Populate-0001
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0001
//! @SYMTestType		CIT
//! @SYMTestPriority		High
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set. If the email size is lesser than the 
//!		TImImap4GetPartialMailInfo::iTotalSizeLimit the email should be completely downloaded.If the email size is
//!		greater than the TImImap4GetPartialMailInfo::iTotalSizeLimit, the email should downloaded based on the 
//!		cumulative size of the message parts.
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from RFC822 file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command and Partial download limits set
//!	4.  Compare the populated messages with sent messages based on the Download limits set
//! 	Implementation and execution:
//!		The emails are sent to the sender's address only.
//!		New messages are created, sent and received.  The received messages are compared with 
//!     	the sent messages, based on the download limits set, for size and contents.
//!	Download limits set: Parital Download limits is set
//!		TImImap4GetPartialMailInfo::iTotalSizeLimit = 35000 bytes
//!		TImImap4PartialMailOptions::ECumulative option is set
//!		Destination Folder : Remote Inbox folder
//! ------------------------------------------
//! @SYMTestExpectedResults
//!	If the email size is lesser than the TImImap4GetPartialMailInfo::iTotalSizeLimit
//!	the email should be completely downloaded. If the email size is greater than 
//!	the TImImap4GetPartialMailInfo::iTotalSizeLimit, the email should downloaded
//!     based on the cumulative size of the message parts.
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini    0019-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer 	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer 	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini   0019-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer 	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-CheckChildrenCountOutbox
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-SendSmtpMessage
RUN_TEST_STEP 300 T_MsgCommonServer 	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-CheckChildrenCountSentItems
RUN_TEST_STEP 300 T_MsgImapServer 	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer 	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer 	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer 	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-CheckChildrenCountRemoteInbox
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer 	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer 	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer 	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer 	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini   0019-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer 	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0019-CheckChildrenCountRemoteInbox

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_Offline_Populate-0001


START_TESTCASE MSG_IMAP_Offline_Populate-0002
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0002
//! @SYMTestType		CIT
//! @SYMTestPriority		High
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc	Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.If Body text size is greater than the 
//!		TImImap4PartialMailInfo::iBodyTextSizeLimit,Body text should be partially downloaded. Footer string should
//!		indicate the remaining size of the body text (body text and html part)in the server.And attachements should not be downloaded.
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from RFC822 file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command
//!	4.  Compare the received messages with sent messages based on the Download limits set
//!	Implementation and execution:
//!	The emails are sent to the sender's address only.
//!	New messages are created, sent and received.  The received messages are compared with 
//!  	the sent messages, based on the download limits set, for size and contents.
//!    	Download Limits set: Partial Download limits is set
//!		TImImap4GetPartialMailInfo::iTotalSizeLimit = 3000
//!		TImImap4GetPartialMailInfo::iBodyTextSizeLimit = Default Value
//!		TImImap4GetPartialMailInfo::iAttachmentSizeLimit = Default Value
//!		TImImap4PartialMailOptions::ECumulative
//! ------------------------------------------
//! @SYMTestExpectedResults
//!	Body text size is greater than the TImImap4PartialMailInfo::iBodyTextSizeLimit,
//!	Body text should be partially downloaded. Footer string should indicate the
//!	remaining size of the body text (body text and html part)in the server.  
//!	And attachements should not be downloaded.
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini     0020-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 300 T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-CheckChildrenCountOutbox
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-SendSmtpMessage
RUN_TEST_STEP 300 T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-CheckChildrenCountSentItems
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0020-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0020-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0020-CheckChildrenCountRemoteInbox1

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_Offline_Populate-0002


START_TESTCASE MSG_IMAP_Offline_Populate-0003
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0003
//! @SYMTestType		CIT
//! @SYMTestPriority		High
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.This tests Populate command for Partial Mail Download Option set to
//!		ECumulative and TotalSizeLimit  set to 14000.
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from RFC822 file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command
//!	4.  Compare the received messages with sent messages based on the Download limits set
//!	Implementation and execution:
//!	The emails are sent to the sender's address only.
//!	New messages are created, sent and received.  The received messages are compared with 
//!   	the sent messages, based on the download limits set, for size and contents.
//!	Download limits set: Complete Download limits is set
//!		TImImap4GetPartialMailInfo::iTotalSizeLimit = 14000 Bytes
//!		TImImap4GetPartialMailInfo::iBodyTextSizeLimit = Default Value (KMaxInt)
//!		TImImap4GetPartialMailInfo::iAttachmentSizeLimit = Default Value (KMaxInt)
//!		TImImap4PartialMailOptions::ECumulative
//! ------------------------------------------
//! @SYMTestExpectedResults
//!	The email contains body text, html and attachements. Body text size is lesser than 
//!	the TImImap4GetPartialMailInfo::iTotalSizeLimit, Body text should be completely downloaded.  
//!	and one of the attachement but html part should not be downloaded. Body text should not 
//!	contain any footer string.
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini     0021-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 300 T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-CheckChildrenCountOutbox
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-SendSmtpMessage
RUN_TEST_STEP 300 T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-CheckChildrenCountSentItems
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0021-CheckChildrenCountRemoteInbox1

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_Offline_Populate-0003


START_TESTCASE MSG_IMAP_Offline_Populate-0004
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0004
//! @SYMTestType		CIT
//! @SYMTestPriority		High
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc	Verification:
//!	This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!	messages based on the Download limits set.This tests Populate command for PartialDownload Mail Option set as ECumulative.
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from RFC822 file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command
//!	4.  Copy the mails from IMAP4 Inbox folder to Local inbox folder	
//!	5.  Compare the received messages with sent messages based on the Download limits set
//! 	Implementation and execution:
//!	The emails are sent to the sender's address only.
//!	New messages are created, sent and received.  The received messages are compared with 
//!    	the sent messages, based on the download limits set, for size and contents.
//!    	Download Limits set: Partial Download limits is set
//!		TImImap4GetPartialMailInfo::iTotalSizeLimit = 16000
//!		TImImap4GetPartialMailInfo::iBodyTextSizeLimit = Default (KMaxInt)
//!		TImImap4GetPartialMailInfo::iAttachmentSizeLimit = Default (KMaxInt)
//!		TImImap4PartialMailOptions::ECumulative
//! ------------------------------------------
//! @SYMTestExpectedResults
//!		If the email size is greater than the TImImap4GetPartialMailInfo::iTotalSizeLimit,
//!		whatever fit in the total size limit should be downloaded in order of body text 
//!		first then attachments and then html part of the email. Footer string should indicate the
//!		remaining size of the body text (body text and html part)in the server.  
//!		If the email size is lesser than the total size limit then the complete mail 
//!		should be downloaded.
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini    0022-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini   0022-SendSmtpMessage0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-SendSmtpMessage1
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini   0022-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini   0022-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0022-CheckChildrenCountRemoteInbox1

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_Offline_Populate-0004


START_TESTCASE	MSG_IMAP_Offline_Populate-0005
//!	@SYMTestCaseID			MSG-IMAP-Offline-Populate-0005
//!	@SYMTestCaseDesc		Verification:	
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.This tests Populate command for PartialDownload Mail Option set
//!		as EBodyTextAndAttachments. Attachment Download Size Limit is set as 6000.
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			
//!		The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!		account are cleaned up before starting the test.
//! 	------------------------------------------
//!		1.  Create emails from RFC822 file and send emails to the same account
//!		2.  Set the download limits
//!		3.  Download the mails with IMAP4 KIMAP4MTMPopulate command and Partial download limits set
//!		4.  Compare the populated messages with sent messages based on the Download limits set
//! 		Implementation and execution:
//!			The emails are sent to the sender's address only.
//!			New messages are created, sent and received.  The received messages are compared with 
//!     		the sent messages, based on the download limits set, for size and contents.
//!		Download limits set: Parital Download limits is set
//!			MaxEmailSize = Default (KMaxInt)
//!			BodyTextSizeLimit = Default (KMaxInt)
//!			AttachmentSizeLimit = 6000
//!			ImapPartialMailOption = TImImap4PartialMailOptions::EBodyTextAndAttachments
//!			Destination Folder : Remote Inbox folder
//!	@SYMTestExpectedResults		EPass, The message is sent and received and also present in the local inbox folder.
//!					If the email size is greater than the TImImap4GetPartialMailInfo::iTotalSizeLimit,
//!					body text size is lesser than iBodyTextSizeLimit and any attachment size is fit 
//!					within the iAttachmentSizeLimit then complete body text and attachment should be downloaded. No Footer 
//!					string should appear. 
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini    	0023-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0023-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0023-CheckChildrenCountSentItems
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4PartialDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-SetImap4PartialDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-ImapInvokeAsyncFunction
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0023-CompareEmailMessages
RUN_TEST_STEP 	300 	T_MsgImapServer		CopyImapSelection		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-CopyImapSelection
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0023-CheckChildrenCountInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0023-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_Offline_Populate-0005


START_TESTCASE	MSG_IMAP_Offline_Populate-0006
//!	@SYMTestCaseID			MSG-IMAP-Offline-Populate-0006
//!	@SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			
//!		The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!		account are cleaned up before starting the test.
//! 	------------------------------------------
//!		1.  Create emails from RFC822 file and send emails to the same account
//!		2.  Set the download limits
//!		3.  Download the mails with IMAP4 KIMAP4MTMPopulate command and Partial download limits set
//!		4.  Compare the populated messages with sent messages based on the Download limits set
//! 		Implementation and execution:
//!			The emails are sent to the sender's address only.
//!			New messages are created, sent and received.  The received messages are compared with 
//!     		the sent messages, based on the download limits set, for size and contents.
//!		Download limits set: Parital Download limits is set
//!			MaxEmailSize = Default (KMaxInt)
//!			BodyTextSizeLimit = Default (KMaxInt)
//!			AttachmentSizeLimit = 6000
//!			ImapPartialMailOption = TImImap4PartialMailOptions::EBodyTextAndAttachments
//!			Destination Folder : Remote Inbox folder
//!	@SYMTestExpectedResults		EPass, The message is sent ,received and also present in the local inbox folder.
//!					Body text and HTML part should be completely downloaded and If attachment size 
//!					is fit within the iAttachmentSizeLimit, attachment should be downloaded. 
//!					No Footer string should appear. 
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini    	0024-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0024-CheckChildrenCountSentItems
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4PartialDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-SetImap4PartialDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-ImapInvokeAsyncFunction
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0024-CompareEmailMessages
RUN_TEST_STEP 	300 	T_MsgImapServer		CopyImapSelection		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-CopyImapSelection
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0024-CheckChildrenCountInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0024-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_Offline_Populate-0006


START_TESTCASE	MSG_IMAP_Offline_Populate-0007
//!	@SYMTestCaseID			MSG-IMAP-Offline-Populate-0007
//!	@SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.Attachment download Limit is set to 5000
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			
//!		The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!		account are cleaned up before starting the test.
//! 	------------------------------------------
//!		1.  Create emails from RFC822 file and send emails to the same account
//!		2.  Set the download limits
//!		3.  Download the mails with IMAP4 KIMAP4MTMPopulate command and Partial download limits set
//!		4.  Compare the populated messages with sent messages based on the Download limits set
//! 		Implementation and execution:
//!			The emails are sent to the sender's address only.
//!			New messages are created, sent and received.  The received messages are compared with 
//!     		the sent messages, based on the download limits set, for size and contents.
//!		Download limits set: Parital Download limits is set
//!			MaxEmailSize = Default (KMaxInt)
//!			BodyTextSizeLimit = Default (KMaxInt)
//!			AttachmentSizeLimit = 5000
//!			ImapPartialMailOption = TImImap4PartialMailOptions::EBodyTextAndAttachments
//!			Destination Folder : Remote Inbox folder
//!	@SYMTestExpectedResults		EPass, The message is sent and received and also present in the local inbox folder.
//!					If the email size is greater than the TImImap4GetPartialMailInfo::iTotalSizeLimit,
//!					only those attachments should be downloded, which are within the iAttachmentSizeLimit 
//!					and within the remaining part of iTotalSizeLimit.
//!					If the email size is lesser than the TImImap4GetPartialMailInfo::iTotalSizeLimit,
//!					all attachments should be downloded, which are within the iAttachmentSizeLimit. 
//!					No Footer string should appear in the body part. 
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini    	0025-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0025-CheckChildrenCountSentItems
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4PartialDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-SetImap4PartialDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-ImapInvokeAsyncFunction
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0025-CompareEmailMessages
RUN_TEST_STEP 	300 	T_MsgImapServer		CopyImapSelection		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0025-CopyImapSelection
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0025-CheckChildrenCountInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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_Offline_Populate-0007


START_TESTCASE	MSG_IMAP_Offline_Populate-0008
//!	@SYMTestCaseID			MSG-IMAP-Offline-Populate-0008
//!	@SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.Populate command for Partial mail Download option set as EBodyTextAndAttachments
//!		Two Messages are send/received to test this functionality.
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			
//!		The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!		account are cleaned up before starting the test.
//! 	------------------------------------------
//!		1.  Create emails from RFC822 file and send emails to the same account
//!		2.  Set the download limits
//!		3.  Download the mails with IMAP4 KIMAP4MTMPopulate command and Partial download limits set
//!		4.  Compare the populated messages with sent messages based on the Download limits set
//! 		Implementation and execution:
//!			The emails are sent to the sender's address only.
//!			New messages are created, sent and received.  The received messages are compared with 
//!     		the sent messages, based on the download limits set, for size and contents.
//!		Download limits set: Parital Download limits is set
//!			MaxEmailSize = Default (KMaxInt)
//!			BodyTextSizeLimit = Default (KMaxInt)
//!			AttachmentSizeLimit = 6000
//!			ImapPartialMailOption = TImImap4PartialMailOptions::EBodyTextAndAttachments
//!			Destination Folder : Remote Inbox folder
//!	@SYMTestExpectedResults		EPass, The message is sent and received and also present in the local inbox folder.
//!					If the email size is greater than the TImImap4GetPartialMailInfo::iTotalSizeLimit,
//!					only those attachments should be downloded, which are within the iAttachmentSizeLimit 
//!					and within the remaining part of iTotalSizeLimit.
//!					If the email size is lesser than the TImImap4GetPartialMailInfo::iTotalSizeLimit,
//!					all attachments should be downloded, which are within the iAttachmentSizeLimit. 
//!					No Footer string should appear in the body part. 
//!	@SYMAuthor			Mrudul V. Pendharkar
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini    	0026-InitNtRas
RUN_TEST_STEP	300	T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-ResetMessageStore
RUN_TEST_STEP 	300 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-DisConnectImap4Server
PRINT Setup Completed
PRINT Execute begins
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CheckChildrenCountOutbox
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-SendSmtpMessage
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CheckChildrenCountSentItems
RUN_TEST_STEP 	300 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CheckChildrenCountOutbox1
RUN_TEST_STEP 	300 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-SendSmtpMessage1
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CheckChildrenCountSentItems1
RUN_TEST_STEP 	300 	T_MsgImapServer		SetImap4PartialDownloadLimits 	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-SetImapPartialDownloadLimits
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 	300 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-ImapInvokeAsyncFunction
RUN_TEST_STEP 	300 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-ConnectImap4Server
RUN_TEST_STEP	300	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-DoFullImap4Synchronisation
RUN_TEST_STEP 	300 	T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     	0026-CompareEmailMessages
RUN_TEST_STEP 	300 	T_MsgImapServer		CopyImapSelection		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CopyImapSelection
RUN_TEST_STEP 	300 	T_MsgCommonServer	CheckChildrenCount 		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    	0026-CheckChildrenCountInbox
RUN_TEST_STEP 	300 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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_Offline_Populate-0008


START_TESTCASE MSG_IMAP_Offline_Populate-0009
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0009
//! @SYMTestType		CIT
//! @SYMTestPriority		High
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc		Verification :
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.Body and Attachment Download Limit is set, so that if message 
//!		contains Body/Attachment greater than the given limit, the message should be partially downloaded.
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from RFC822 file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command and Partial download limits set
//!	4.  Compare the populated messages with sent messages based on the Download limits set
//! 	Implementation and execution:
//!		The emails are sent to the sender's address only.
//!		New messages are created, sent and received.  The received messages are compared with 
//!     	the sent messages, based on the download limits set, for size and contents.
//!	Download limits set: Parital Download limits is set
//!		TImImap4GetPartialMailInfo::iTotalSizeLimit = Default Value
//!		TImImap4GetPartialMailInfo::iBodyTextSizeLimit = 4000
//!		TImImap4GetPartialMailInfo::iAttachmentSizeLimit = 6000
//!		TImImap4PartialMailOptions::EBodyTextAndAttachments
//! ------------------------------------------
//! @SYMTestExpectedResults
//!	If Body text part is greater than iBodyTextSizeLimit then the body part should 
//!	be partially downloaded and footer string should appear in the body part. only 
//!	those attachments should be downloded, which are within the iAttachmentSizeLimit
//!	and within the remaining part of iTotalSizeLimit. Body part should be 
//!	completely downloaded if it is lesser than iBodyTextSizeLimit and all attachments 
//!	should be downloded, which are within the iAttachmentSizeLimit limit.
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini     0027-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-SendSmtpMessage
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0027-CheckChildrenCountRemoteInbox1
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer 	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer 	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer 	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini     0027-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_Offline_Populate-0009


START_TESTCASE MSG_IMAP_Offline_Populate-0010
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0010
//! @SYMTestType		CIT
//! @SYMTestPriority		High
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set. Partial Download Option is set to get the body text less than 
//!		or equal to body text size limit and attachments less than or equal to attachment size limit.
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from RFC822 file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command
//!	4.  Compare the received messages with sent messages based on the Download limits set
//! 	Implementation and execution:
//!	The emails are sent to the sender's address only.
//!	New messages are created, sent and received.  The received messages are compared with 
//!    	the sent messages, based on the download limits set, for size and contents.
//! 	Download Limits set: Partial Download limits is set
//!		TImImap4GetPartialMailInfo::iTotalSizeLimit = Default Value
//!		TImImap4GetPartialMailInfo::iBodyTextSizeLimit = 6000
//!		TImImap4GetPartialMailInfo::iAttachmentSizeLimit = 5000
//!		TImImap4PartialMailOptions::EBodyTextAndAttachments
//! ------------------------------------------
//! @SYMTestExpectedResults
//!	Body text completely donwloaded, HTML not downloaded.  Attachment downloaded based 
//!	on the attachment limit set. If body text part is greater than iBodyTextSizeLimit 
//!	then the body part should be partially downloaded, html part should  not be 
//!	downloded. And footer string should appear in the body part. only those 
//!	attachments should be downloded, which are within the iAttachmentSizeLimit.
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini        0028-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-SendSmtpMessage
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-CheckChildrenCountRemoteInbox1
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini         0028-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.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_Offline_Populate-0010


START_TESTCASE MSG_IMAP_Offline_Populate-0011
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0011
//! @SYMTestType		CIT
//! @SYMTestPriority		High
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.Attachment is downloaded based on size & body text size of 
//!		email > TImImap4GetPartialMailInfo::iBodyTextSizeLimit
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from RFC822 file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command
//!	4.  Compare the received messages with sent messages based on the Download limits set
//! 	Implementation and execution:
//!	The emails are sent to the sender's address only.
//!	New messages are created, sent and received.  The received messages are compared with 
//!	the sent messages, based on the download limits set, for size and contents.
//!	Download Limits set:
//!	TImImap4GetPartialMailInfo::iTotalSizeLimit = Default Value
//!	TImImap4GetPartialMailInfo::iBodyTextSizeLimit = 8000
//!	TImImap4GetPartialMailInfo::iAttachmentSizeLimit = 6000
//!	TImImap4PartialMailOptions::EBodyTextAndAttachments
//!	Destination Folder : Remote Inbox folder
//! ------------------------------------------
//! @SYMTestExpectedResults
//!	If body text size of email > TImImap4GetPartialMailInfo::iBodyTextSizeLimit 
//!	mail will be downloaded partially containing the footer string information.
//!	All The Attachments having size <= TImImap4GetPartialMailInfo::iAttachmentSizeLimit
//!	will be downloaded.
//!	Attachment downloaded based on size 
//!	attachment size limit
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini      0029-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-CreateSmtpMessageFromEmailFile
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-SendSmtpMessage
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini      0029-CheckChildrenCountRemoteInbox1

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_Offline_Populate-0011


START_TESTCASE MSG_IMAP_Offline_Populate-0012
//! @SYMTestCaseID		MSG-IMAP-Offline-Populate-0012
//! @SYMTestType		CIT
//! @SYMTestPriority		medium
//! @SYMTestStatus 		Implemented
//! @SYMTestCaseDependencies
//! @SYMTestCaseDesc		Verification:
//!		This test tests if Offline Populate downloads the message. It also compares the received messages with sent 
//!		messages based on the Download limits set.Attachment downloaded based on size & body text size of 
//!		email > TImImap4GetPartialMailInfo::iBodyTextSizeLimit
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//! @SYMTestActions
//!	The Local Inbox and Sent Item folders and the remote Inbox folder of IMAP4 
//!	account are cleaned up before starting the test.
//! ------------------------------------------
//!	1.  Create emails from data file and send emails to the same account
//!	2.  Set the download limits
//!	3.  Download the mails with IMAP4 KIMAP4MTMPopulate command
//!	4.  Copy the mails from IMAP4 Inbox folder to Local inbox folder	
//!	5.  Compare the received messages with sent messages based on the Download limits set
//!	Implementation and execution:
//!	The emails are sent to the sender's address only.
//!	New messages are created, sent and received.  The received messages are compared with 
//!	the sent messages, based on the download limits set, for size and contents.
//!	Download Limits set:
//!	TImImap4GetPartialMailInfo::iTotalSizeLimit = default
//!	TImImap4GetPartialMailInfo::iBodyTextSizeLimit = 4000
//!	TImImap4GetPartialMailInfo::iAttachmentSizeLimit = 2000
//!	TImImap4PartialMailOptions::EBodyTextAndAttachments
//!	Destination Folder : Remote Inbox folder
//! ------------------------------------------
//! @SYMTestExpectedResults
//!	If body text size of email > TImImap4GetPartialMailInfo::iBodyTextSizeLimit
//!	Mails will be downloaded partially containing the footer string information
//!	All The Attachments having size <= TImImap4GetPartialMailInfo::iAttachmentSizeLimit
//!	will be downloaded.
//!	@SYMREQ				5578
//!	@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\offline\msg-imap-offline2.ini     0030-InitNtRas
RUN_TEST_STEP 300 T_MsgCommonServer	ResetMessageStore		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-ResetMessageStore
RUN_TEST_STEP 300 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-DoFullImap4Synchronisation
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-CheckChildrenCountRemoteInbox0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-SendSmtpMessage0
RUN_TEST_STEP 300 T_MsgSmtpServer	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-CreateSmtpMessageFromEmailFile1
RUN_TEST_STEP 300 T_MsgSmtpServer	SendSmtpMessage			c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-SendSmtpMessage1
RUN_TEST_STEP 300 T_MsgImapServer	SetImap4PartialDownloadLimits	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-SetImap4PartialDownloadLimits
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-DisConnectImap4Server
//Offline Populate
RUN_TEST_STEP 300 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-ImapInvokeAsyncFunction
RUN_TEST_STEP 300 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-ConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-DoFullImap4Synchronisation1
RUN_TEST_STEP 300 T_MsgImapServer 	CompareEmailMessages		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-CompareEmailMessages
RUN_TEST_STEP 300 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-DisConnectImap4Server
RUN_TEST_STEP 300 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\offline\msg-imap-offline2.ini    0030-CheckChildrenCountRemoteInbox1

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_Offline_Populate-0012


