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

RUN_UTILS DeleteFile c:\messaging.db

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


START_TESTCASE	MSG-IMAP-FULL-SYNC-0001
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0001
//!	@SYMTestCaseDesc		The test aims to verify the mails downloaded when the inbox sync limit is set to 1, for the command
//!					KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					  ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8. Sets the full download limits, with the inbox sync limit as 1.
//!					9. Connects to the IMAP server, performs a full synchronisation.
//!					10. Verifies the count of the messages received in the Inbox.
//!					11. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, Only ONE message is synced in INBOX.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0001-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0001-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-SendSmtpMessage_1
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-CreateSmtpMessageFromEmailFile1_1
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-SendSmtpMessage1_1
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-CheckChildrenCountSentItems_1
// Set the INBOX sync limit to 1
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-SetImap4FullDownloadLimits_1
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-DoFullImap4Synchronisation
// Only ONE message is synced in INBOX.
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0001-CheckChildrenCountRemoteInbox1_1
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0001


START_TESTCASE	MSG-IMAP-FULL-SYNC-0002
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0002
//!	@SYMTestCaseDesc		The test aims to verify the mails downloaded when the inbox sync limit is set to 0,
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented
//!	@SYMPREQ 			1160   
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8. Sets the full download limits, with the inbox sync limit as 0.
//!					9. Connects to the IMAP server, performs a full synchronisation.
//!					10. Verifies the count of the messages received in the Inbox.
//!					11. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, No messages are synced in INBOX.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0002-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0002-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-SendSmtpMessage_2
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-CreateSmtpMessageFromEmailFile1_2
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-SendSmtpMessage1_2
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-CheckChildrenCountSentItems_2
// Set the INBOX sync limit to 0
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-SetImap4FullDownloadLimits_2
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-DoFullImap4Synchronisation
// NO messages are synced in INBOX.
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0002-CheckChildrenCountRemoteInbox2_2
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0002


START_TESTCASE	MSG-IMAP-FULL-SYNC-0003
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0003
//!	@SYMTestCaseDesc		The test aims to verify the mails downloaded when the inbox sync limit is set to -1,
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented 
//!	@SYMPREQ 			1160  
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8. Sets the full download limits, with the inbox sync limit as default.
//!					9. Connects to the IMAP server, performs a full synchronisation.
//!					10. Verifies the count of the messages received in the Inbox.
//!					11. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages that are sent are receievd.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0003-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0003-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-CreateSmtpMessageFromEmailFile_3
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-SendSmtpMessage_3
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-CreateSmtpMessageFromEmailFile1_3
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-SendSmtpMessage1_3
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-CheckChildrenCountSentItems_3
// Set INBOX sync limit to -1
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-SetImap4FullDownloadLimits_3
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-DoFullImap4Synchronisation
// ALL the messages in INBOX are synchronised
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0003-CheckChildrenCountRemoteInbox3_3
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0003


START_TESTCASE	MSG-IMAP-FULL-SYNC-0004
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0004
//!	@SYMTestCaseDesc		The test aims to verify the mails downloaded when the mailbox sync limit is set to 0,
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented 
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563  
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Connects to the server.
//!					8. Creates a remote folder, verifies its creation.
//!					9. Performs a full sync.
//!					10. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					11. Sets the full download limits, with the mailbox sync limit as 0.
//!					12. Connects to the IMAP server, performs a full synchronisation.
//!					13. Verifies the count of the messages received in the created remote folder.
//!					14. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, No messages are synchronised in the remote folder created.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0004-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0004-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-CreateSmtpMessageFromEmailFile_4
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-SendSmtpMessage_4
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-CreateSmtpMessageFromEmailFile1_4
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-SendSmtpMessage1_4
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-CheckChildrenCountSentItems_4
// Set mailbox sync limit to 0, so that NO messages are synced.
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-SetImap4FullDownloadLimits_4
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-CreateFolder_4
RUN_TEST_STEP	100	T_MsgImapServer		FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-FindEntryByName_4
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-DoFullImap4Synchronisation
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-CheckChildrenCountRemoteInbox1_4
RUN_TEST_STEP 	100 	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0004-ImapInvokeAsyncFunction_4
// Copy the messages to the user created remote folder.
RUN_TEST_STEP 	100 	T_MsgImapServer		CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0004-CopyImapSelectionRemote_4
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0004-CheckChildrenCountImap_4
// Perform a sync
RUN_TEST_STEP 	100 	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0004-DoFullImap4Synchronisation
// NO messages are synchronised, in the user created folder
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0004-CheckChildrenCountRemoteInbox0_4
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0004


START_TESTCASE	MSG-IMAP-FULL-SYNC-0005
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0005
//!	@SYMTestCaseDesc		The test aims to verify the mails downloaded when the mailbox sync limit is set to 1
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented 
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563  
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Connects to the server.
//!					8. Creates a remote folder, verifies its creation.
//!					9. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					10. Sets the full download limits, with the mailbox sync limit as 1.
//!					11. Connects to the IMAP server, performs a full synchronisation.
//!					12. Verifies the count of the messages received in the created remote folder.
//!					13. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The recent messages are synchronised in the remote folder created.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0005-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CreateImapAccount
RUN_TEST_STEP 100 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-ChangeSubAndSyncSettings
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-InitialiseImap4Account
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CreateSmtpMessageFromEmailFile_5
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0005-SendSmtpMessage_5
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CreateSmtpMessageFromEmailFile1_5
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-SendSmtpMessage1_5
// Set mailbox sync limit to 1, to sync recent messages
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-SetImap4FullDownloadLimits_5
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CreateFolder_5
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-FindEntryByName_5
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-SubscribeImapFolder_5
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CheckChildrenCountRemoteInbox1_5
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-ImapInvokeAsyncFunction_5
// Copy the messages to the user created remote folder.
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CopyImapSelectionRemote_5
// Perform a sync, so that the new messages are synced into the user created remote folder
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-CheckChildrenCountRemoteFolder0_5
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-UnsubscribeImapFolder_5
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0005-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0005


START_TESTCASE	MSG-IMAP-FULL-SYNC-0006
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0006
//!	@SYMTestCaseDesc		The test aims to verify the mails downloaded when the mailbox sync limit is set to -1
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented
//!	@SYMPREQ 			1160   
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Connects to the server.
//!					8. Creates a remote folder, verifies its creation.
//!					9. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					10.Sets the full download limits, with the mailbox sync limit as -1.
//!					11. Connects to the IMAP server, performs a full synchronisation.
//!					12. Verifies the count of the messages received in the created remote folder.
//!					13. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages are synchronised in the remote folder created.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini      0006-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CreateImapAccount
RUN_TEST_STEP 100 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-ChangeSubAndSyncSettings
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-InitialiseImap4Account
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CreateSmtpMessageFromEmailFile_6
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-SendSmtpMessage_6
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CreateSmtpMessageFromEmailFile1_6
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-SendSmtpMessage1_6
// Set the mailbox sync limit to -1
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-SetImap4FullDownloadLimits_6
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-ConnectImap4Server
// Create a remote folder
RUN_TEST_STEP 100 T_MsgImapServer	CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CreateFolder_6
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-FindEntryByName_6
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-DoFullImap4Synchronisation
// Check if all the messages are synced, INBOX.
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CheckChildrenCountRemoteInbox1_6
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-ImapInvokeAsyncFunction_6
// Copy the messages into the user created  remote folder.
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CopyImapSelectionRemote_6
// Verify of all the messages are copied into the user created folder.
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CheckChildrenCountImap_6
// Perform a sync, so that all the messages are synced into the user created remote folder
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0006-CheckChildrenCountRemoteInbox0_6
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0006


START_TESTCASE	MSG-IMAP-FULL-SYNC-0007
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0007
//!	@SYMTestCaseDesc		The test aims to verify the mails synced when the Search string is specified for INBOX
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with the Search String specified.
//!					9. Connects to the server.
//!					10.Performs a full synchronisation.
//!					11.Verifies the count of the messages received in INBOX.
//!					12.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The message whose subject matches the Search String specified is synced.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0007-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0007-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0007-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0007-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0007-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0007-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-CreateSmtpMessageFromEmailFile_7
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-SendSmtpMessage_7
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-CreateSmtpMessageFromEmailFile1_7
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-SendSmtpMessage1_7
// Set the download limits with the Search String specified.
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-SetImap4FullDownloadLimits_7
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-DoFullImap4Synchronisation
// Only the messages whose subject matches the Search String are synced.
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-CheckChildrenCountRemoteInbox1_7
// Download all the mails.
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-ImapInvokeAsyncFunction_7
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0007-FindEntryByName_7
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0007


START_TESTCASE	MSG-IMAP-FULL-SYNC-0008
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0008
//!	@SYMTestCaseDesc		The test aims to verify the mails synced when an INVALID Search string is specified for INBOX
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with an INVALID Search String specified for INBOX.
//!					9. Connects to the IMAP server, performs a full synchronisation.
//!					10. Verifies the count of the messages received in INBOX.
//!					11. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, No message is synced, due to the INVALID Search String specified.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0008-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0008-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0008-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0008-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0008-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-CreateSmtpMessageFromEmailFile_8
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-SendSmtpMessage_8
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-CreateSmtpMessageFromEmailFile1_8
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-SendSmtpMessage1_8
// Set the download limits with an INVALID Search String specified.
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-SetImap4FullDownloadLimits_8
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-DoFullImap4Synchronisation
// NO mails are synced, due to the INVALID Search String Specified.
RUN_TEST_STEP_RESULT 106 100 T_MsgImapServer	CheckChildrenCountImap	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0008-CheckChildrenCountRemoteInbox1_8
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0008


START_TESTCASE	MSG-IMAP-FULL-SYNC-0009
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0009
//!	@SYMTestCaseDesc		The test aims to verify the mails synced when the Search string is specified for DRAFTS folder
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with the Search String specified.
//!					   The Search String contains the subject which matches any of the mails sent.
//!					9. Connects to the IMAP server, performs a full synchronisation.
//!					10. Downloads all the mails into the INBOX 
//!					11. Performs a remote copy to the Drafts folder.
//!					12. Performs a sync.
//!					13. Verifies the count of the messages received in the DRAFTS folder.
//!					14. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The message with the subject matching the Search String is synced in the 
//!					Drafts folder.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0009-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0009-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0009-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0009-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0009-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CreateSmtpMessageFromEmailFile_9
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-SendSmtpMessage_9
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CreateSmtpMessageFromEmailFile1_9
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-SendSmtpMessage1_9
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-SubscribeImapFolder_9
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CheckChildrenCountRemoteInbox1_9
// Download all the mails.
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-ImapInvokeAsyncFunction_9
// Copy the messages into the Drafts folder.
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CopyImapSelectionRemote_9
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CheckChildrenCountRemoteDrafts_9
// Have to disconnect the server as you cannot set the download limits while online
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-DisConnectImap4Server
// Set the download limits with a Search String specified.
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-SetImap4FullDownloadLimits_9
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0009-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-CheckChildrenCountRemoteDrafts1_9
// Check if the message matching the Search String is synced to the Drafts folder.
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-FindEntryByName_9
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-UnsubscribeImapFolder_9
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0009-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0009


START_TESTCASE	MSG-IMAP-FULL-SYNC-0010
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0010
//!	@SYMTestCaseDesc		The test aims to verify the mails synced when the Search string is specified for SENT ITEMS folder,
//!					for the IMAp command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Connects to the IMAP server, performs a full synchronisation.
//!					9. Downloads all the mails and performs a remote copy to the SENT ITEMS folder.
//!					10. Sets the full download limits, with the Search String specified.
//!					    The Search String contains the subject which matches any of the mails sent.
//!					11. Performs a sync.
//!					12. Verifies the count of the messages received in the SENT ITEMS folder.
//!					13. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The message with the subject matching the Search String is synced in the 
//!					SENT ITEMS folder.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0010-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0010-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0010-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0010-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0010-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-CreateSmtpMessageFromEmailFile_10
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-SendSmtpMessage_10
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-CreateSmtpMessageFromEmailFile1_10
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-SendSmtpMessage1_10
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-SubscribeImapFolder_10
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-CheckChildrenCountRemoteInbox1_10
// Download all the mails.
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-ImapInvokeAsyncFunction_10
// Copy the messages into the SENT ITEMS folder.
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-CopyImapSelectionRemote_10
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-CheckChildrenCountRemoteSent_10
// Have to disconnect the server as you cannot set the download limits while online
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-DisConnectImap4Server
// Set the download limits with a Search String specified.
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-SetImap4FullDownloadLimits_10
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini  0010-CheckChildrenCountRemoteSent1_10
// Check if the message matching the Search String is synced to the SENT ITEMS folder.
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-FindEntryByName_10
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-UnsubscribeImapFolder_10
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0010-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0010


START_TESTCASE	MSG-IMAP-FULL-SYNC-0011
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0011
//!	@SYMTestCaseDesc		The test aims to verify the mails synced when the Search string is specified for a User created folder
//!					for the command KIMAP4MTMFullSync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Connects to the IMAP server, performs a full synchronisation.
//!					9. Downloads all the mails and performs a remote copy to the User created folder folder.
//!					10. Sets the full download limits, with the Search String specified.
//!					    The Search String contains the subject which matches any of the mails sent.
//!					11. Performs a sync.
//!					12. Verifies the count of the messages received in the User created folder folder.
//!					13. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The message with the subject matching the Search String is synced in the 
//!					User created folder folder.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0011-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		 0011-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0011-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0011-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0011-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0011-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CreateSmtpMessageFromEmailFile_11
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-SendSmtpMessage_11
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CreateSmtpMessageFromEmailFile1_11
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-SendSmtpMessage1_11
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CheckChildrenCountRemoteInbox1_11
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-ImapInvokeAsyncFunction_11
// Create a remote folder
RUN_TEST_STEP 100 T_MsgImapServer	CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CreateFolder_11
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-FindEntryByName_11
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-SubscribeImapFolder_11
// Copy the messages into the user created  remote folder.
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CopyImapSelectionRemote_11
// Verify of all the messages are copied into the user created folder.
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CheckChildrenCountRemoteFolder_11
// Have to disconnect the server as you cannot set the download limits while online
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-DisConnectImap4Server
// Set the Search String
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-SetImap4FullDownloadLimits_11
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-ConnectImap4Server
// Perform a sync, so that the messages whose subject ,matches the search string is synced into the user created remote folder
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-CheckChildrenCountRemoteFolder1_11
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-FindEntryByName_11
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-UnsubscribeImapFolder_11
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0011-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0011


START_TESTCASE	MSG-IMAP-FULL-SYNC-0012
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0012
//!	@SYMTestCaseDesc		The test aims to verify the folders synced when the Folder Sync type is EUseLocal,
//!					Update the local copy of folder information when it is received from remote IMAP4 
//!					server at the beginning of the mail session, using the command KIMAP4MTMFullSync . 
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with the folder sync type set to EUseLocal.
//!					9. Connects to the IMAP server.
//!					10. Creates a local folder,performs a full synchronisation.
//!					11. Copies the messages from the INBOX to the remotely created folder.
//!					12. Performs a full synchronisation
//!					13. Verifies if the locally created folder is updated remotely.
//!					14. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The remotely created folder is updated locally.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0012-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0012-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0012-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0012-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0012-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0012-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CreateSmtpMessageFromEmailFile_12
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-SendSmtpMessage_12
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CreateSmtpMessageFromEmailFile1_12
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-SendSmtpMessage1_12
// Set the Folder Sync Type to EUseLocal
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-SetImap4FullDownloadLimits_12
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CheckChildrenCount_12
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-ImapInvokeAsyncFunction_12
// Create a folder remotely
RUN_TEST_STEP 100 T_MsgImapServer	CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CreateFolder_12
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-FindEntryByName_12
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-SubscribeImapFolder_12
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CopyImapSelectionRemote_12
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-CheckChildrenCountRemote_12
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-DoFullImap4Synchronisation
// Verify if the remotely created folder is updated locally.
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-FindEntryByName1_12
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-FindEntryByName2_12
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-UnsubscribeImapFolder_12
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0012-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0012


START_TESTCASE	MSG-IMAP-FULL-SYNC-0013
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0013
//!	@SYMTestCaseDesc		The test aims to verify the folders synced when the Folder Sync type is EUseRemote.
//!					Update the local copy of folder information when it is received from remote IMAP4 
//!					server at the beginning of the mail session, using the IMAP command KIMAP4MTMFullSync. 
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with the folder sync type set to EUseRemote.
//!					9. Subscribes to the DRafts folder.Check if the folder is subscribed.
//!					10. Connects to the IMAP server.
//!					11.Performs a full sync 
//!					12.Verifies if the subscription flags are updated remotely.
//!					13. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The subscription flags are updated remotely.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0013-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0013-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0013-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0013-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0013-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		 0013-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-CreateSmtpMessageFromEmailFile_13
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-SendSmtpMessage_13
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-CreateSmtpMessageFromEmailFile1_13
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-SendSmtpMessage1_13
// Set the Folder Sync Type to EUseRemote.
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-SetImap4FullDownloadLimits_13
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-CheckImap4Subscription0_13
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-SubscribeImap4Folder_13
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-DoFullImap4Synchronisation
// REMOTE subscriptions status only gets upadted once you have done a SYNC.
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-CheckImap4Subscription_13
// Change the Sync settings to use the remote subs.
RUN_TEST_STEP 100 T_MsgImapServer	ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-ChangeSubAndSyncSettings_13
// Mark the folder as unscribed.
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-UnsubscribeImap4Folder_13
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-DoFullImap4Synchronisation
// Since UseRemote has been set folder should be resubscribed.
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-CheckImap4Subscription_13
// Check if the locally created folder is updated remotely
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-FindEntryByName_13
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-UnsubscribeImap4Folder_13
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0013-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-FULL-SYNC-0013


START_TESTCASE	MSG-IMAP-FULL-SYNC-0014
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0014
//!	@SYMTestCaseDesc		The test aims to verify the folders synced when the Folder Sync type is EUseCombination
//!					Merge local and remote folder information, using the IMAP command KIMAP4MTMFullSync.
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with the folder sync type set to EUseCombination.
//!					9.Subscribe to the Drafts folder.
//!					10.Connects to the IMAP server.
//!					11. Creates a folder.
//!					12.Performs a full synchronisation.
//!					13.Verifies if the locally created folder is updated remotely and the remotely created folder
//!					   is updated locally.
//!					14.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The local and remote folder information merged.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini     0014-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0014-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0014-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0014-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0014-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0014-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-SubscribeImapFolder_Drafts
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CreateSmtpMessageFromEmailFile_14
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-SendSmtpMessage_14
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CreateSmtpMessageFromEmailFile1_14
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-SendSmtpMessage1_14
// Set the Folder Sync Type to EUseCombination
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-SetImap4FullDownloadLimits_14
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CheckChildrenCountRemoteInbox1_14
// Download all the mails.
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-ImapInvokeAsyncFunction_14
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DisConnectImap4Server
// Copy the messages into the Drafts folder.
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CopyImapSelectionDrafts_14
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CheckChildrenCountRemoteDrafts_14
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-ConnectImap4Server
// Create a folder remotely
RUN_TEST_STEP 100 T_MsgImapServer	CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CreateFolderRemote_14
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-SubscribeImapFolder_14
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-FindEntryByNameRemote_14
// Copy the messages into the Drafts folder.
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CopyImapSelectionRemote_14
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-CheckChildrenCountRemoteFolder_14
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName    		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-FindEntryByNameRemoteFolder_14
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName    		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-FindEntryByNameDrafts_14
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-UnsubscribeImapFolder_Drafts
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-UnsubscribeImapFolder_14
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DeleteImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0014-DeleteFolderRemote_14
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0014


START_TESTCASE	MSG-IMAP-FULL-SYNC-0015
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0015
//!	@SYMTestCaseDesc		This test aims to verify that the subscription 
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1. Startup test steps are called for the different servers to create session,
//!					   IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Sets the full download limits, with the folder subscribe type set to EUpdateLocal.
//!					8. Connects to the IMAP server,performs a full synchronisation.
//!					9. Create a folder remotely.
//!					10. Subscribes the folder.
//!					11. Again performs a full sync.
//!					12. Verifies if the local folder has the same subscription information.
//!					13. Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The local copy of the folder is updated with the subscription information.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0015-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0015-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0015-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0015-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0015-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-CheckChildrenCountRemoteInbox
// Set the Folder Subscribe type to EUpdateBoth
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-SetImap4FullDownloadLimits_15_remote
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-ConnectImap4Server
// Create a folder remotely
RUN_TEST_STEP 100 T_MsgImapServer	CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-CreateFolderRemote_15
RUN_TEST_STEP 100 T_MsgImapServer	FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-FindEntryByNameRemote_15
// Locally Subscribe to the created folder.
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-SubscribeImap4Folder_15
// Do the full sync to update the remote server subscriptions status
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-CheckImap4Subscription_15
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-DisConnectImap4Server
// Set the Folder Subscribe type to EUpdateLocal
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-SetImap4FullDownloadLimits_15
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-ConnectImap4Server
// UnSubscribe created folder locally
RUN_TEST_STEP 100 T_MsgImapServer	UnsubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-UnsubscribeImapFolder_15	
// Performs a full sync to update the subscriptions
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-DoFullImap4Synchronisation
// Verify that the folder is still subscribed as per EUseCombination and EUpdateLocal. i.e. The remote subscriptions have not changed.
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0015-CheckImap4Subscription_15
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0015


START_TESTCASE	MSG-IMAP-FULL-SYNC-0016
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0016
//!	@SYMTestCaseDesc		The test aims to verify the folders subscribed when the folder subscribe type is EUpdateRemote
//!					Update remote copy of subscription information so that it matches the local subscription information.
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with the folder subscribe type set to EUseRemote.
//!					9. Connects to the IMAP server
//!					10. Subscribes to the Sent Items folder,performs a full synchronisation.
//!					11. Verifies if the remote folder has the same subscription information.
//!					12.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The remote copy of the Sent Items folder is updated with the local subscription information.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0016-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0016-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0016-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0016-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0016-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-CreateSmtpMessageFromEmailFile_16
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-SendSmtpMessage_16
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-CreateSmtpMessageFromEmailFile1_16
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-SendSmtpMessage1_16
// Set the Folder Subscribe type to EUpdateRemote
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-SetImap4FullDownloadLimits_16
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-CheckImap4Subscription0_16
// Subscribe to the Sent Items folder.
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-SubscribeImap4Folder_16
// Check if the subscription flags are updated
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0016-CheckImap4Subscription1_16
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0016


START_TESTCASE	MSG-IMAP-FULL-SYNC-0017
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0017
//!	@SYMTestCaseDesc		The test aims to verify the folders subscribed when the folder subscribe type is EUpdateBoth.
//!					Merge local and remote subscription information, store updated information on the remote server
//!					and store merged data on the local server. 
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					  ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8.Sets the full download limits, with the folder subscribe type set to EUpdateBoth.
//!					9.Subscribes the remote OUTBOX folder.Subscribes the local S
//!					10.Connects to the IMAP server,performs a full synchronisation.
//!					11.Verifies if the remote folder has the updated subscription information.
//!					12.Verifies if the local OUTBOX folder is updated with the subscription information.
//!					13.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, the local Drafts folder is updated with the subscription information.
//!					The OUTBOX folder has the updated subscription information.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0017-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0017-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0017-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0017-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0017-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CreateSmtpMessageFromEmailFile_17
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-SendSmtpMessage_17
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CreateSmtpMessageFromEmailFile1_17
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-SendSmtpMessage1_17
// Set the Folder Subscribe type to EUpdateBoth
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-SetImap4FullDownloadLimits_17
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CheckImap4SubscriptionLocal0_17
// Subscribe  the locally created folder.
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-SubscribeImap4FolderLocal_17
//RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0017-CheckImap4SubscriptionLocal_17
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CheckImap4SubscriptionRemote1_17
// Subscribe  the remote OUTBOX folder.
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-SubscribeImap4FolderRemote_17
// Verify if the Subscription flags are updated.
//RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CheckImap4SubscriptionRemote_17
// Sync the remotely created folder
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-DoFullImap4Synchronisation
// Verify if the local and remote subscription information is updated.
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CheckImap4SubscriptionLocal1_17
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0017-CheckImap4SubscriptionRemote1_17
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0017


START_TESTCASE	MSG-IMAP-FULL-SYNC-0018
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0018
//!	@SYMTestCaseDesc		The test aims to verify the folders subscribed when the folder subscribe type is EUpdateNeither.
//!					Do not alter local or remote subscription information.
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented  
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563 
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2. Initialises the RAS connection.
//!					3. Resets the message store and central repository to default state.
//!					4. Creates an IMAP account by reading the settings from the file mentioned in the 
//!					   ini config file thus setting the IMAP and SMTP service settings.
//!					5. Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6. Deletes all mails in the Inbox of the IMAP server.
//!					7. Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8. Sets the full download limits, with the folder subscribe type set to EUpdateNeither.
//!					9. Subscribes the remote OUTBOX folder.
//!					10.Creates a folder locally.Subscribe the folder.
//!					11.Connects to the IMAP server,performs a full synchronisation.
//!					12.Verifies if the remote folder has the updated subscription information.
//!					13.Verifies if the local OUTBOX folder is updated with the subscription information.
//!					14.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass,Neither the local nor remote subscription information is altered.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0018-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0018-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0018-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0018-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0018-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   0018-CreateSmtpMessageFromEmailFile_18
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-SendSmtpMessage_18
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-CreateSmtpMessageFromEmailFile1_18
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-SendSmtpMessage1_18
// Set the Folder Subscribe type to EUpdateNeither
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-SetImap4FullDownloadLimits_18
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-CheckImap4SubscriptionLocal0_18
// Subscribe  the local Drafts folder.
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-SubscribeImap4FolderLocal_18
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-CheckImap4SubscriptionRemote0_18
// Subscribe  the remote OUTBOX folder.
RUN_TEST_STEP 100 T_MsgImapServer	SubscribeImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-SubscribeImap4FolderRemote_18
// Sync the remotely created folder
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-DoFullImap4Synchronisation
// Verify if the local and remote subscription information is updated.
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-CheckImap4SubscriptionLocal1_18
RUN_TEST_STEP 100 T_MsgImapServer	CheckImap4Subscription		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0018-CheckImap4SubscriptionRemote1_18
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULL-SYNC-0018


START_TESTCASE	MSG-IMAP-FULL-SYNC-0019
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0019
//!	@SYMTestCaseDesc		To verify the messages synced when the flag KImap4EmailDeleteEmailsWhenDisconnecting flag is enabled.
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented  
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563 
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection
//!					3.Resets the message store to clean up the central repository
//!					4.Creates an IMAP account by reading the settings from the file mentioned
//!					  thus setting the IMAP and SMTP service settings
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox on the server.
//!					7.Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					8.Sets the full download limits with the above flag enabled.
//!					9.Download the mails with IMAP4 KIMAP4MTMPopulate command
//!					  and compares the received messages with sent messages based on the Download limits set.
//!					10.Disconnect from the server
//!					11.Delete the message
//!					12.Connect to the Imap Server
//!					13.Disconnect from the Server.
//!					14.Verify if the message is deleted.
//!					15.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass,The message received has been deleted from the Imap server also.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0019-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DoFullImap4Synchronisation
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-CreateSmtpMessageFromEmailFile_19
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-CheckChildrenCountOutbox_19
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-SendSmtpMessage_19
// Enable the flag KImap4EmailDeleteEmailsWhenDisconnecting 
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-SetImap4FullDownloadLimits_19
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-ConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		DoFullImap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-ImapInvokeAsyncFunction_19
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DisConnectImap4Server
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-CheckChildrenCountRemoteInbox1_19
// Mark the message for delete while offline
RUN_TEST_STEP 	100 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DeleteMessage_19
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-ConnectImap4Server
// Run the Sync with the late delete flag sets
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DoFullImap4Synchronisation
// Check that the deletes has not occured
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-CheckChildrenCountRemoteInbox1_19
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-DisConnectImap4Server
// Check that the deletes has occured
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0019-CheckChildrenCountRemoteInbox_19

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-FULL-SYNC-0019


START_TESTCASE	MSG-IMAP-FULL-SYNC-0020
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0020
//!	@SYMTestCaseDesc		To verify the messages synced when the flag KImap4EmailDeleteEmailsWhenDisconnecting flag is disabled.
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection
//!					3.Resets the message store to clean up the central repository
//!					4.Creates an IMAP account by reading the settings from the file mentioned
//!					  thus setting the IMAP and SMTP service settings
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox on the server.
//!					7.Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					8.Sets the full download limits, with the above flag disabled.
//!					9.Download the mails with IMAP4 KIMAP4MTMConnectAndPopulateAllMailAndStayOnline command
//!					  and compares the received messages with sent messages based on the Download limits set.
//!					10.Disconnect from the server
//!					11.Delete the message.
//!					12.Connect to the Imap Server.
//!					13.Do Full synchronisation.
//!					14.Disconnect from the Server.
//!					15.Verify if the mesage has been deleted.
//!					16.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass,The message received has been deleted from the Imap server also.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0020-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DoFullImap4Synchronisation
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-CreateSmtpMessageFromEmailFile_20
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-CheckChildrenCountOutbox_20
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-SendSmtpMessage_20
// Enable the flag KImap4EmailDeleteEmailsWhenDisconnecting 
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-SetImap4FullDownloadLimits_20
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-ImapInvokeAsyncFunction_20
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-CheckChildrenCountRemoteInbox1_20
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DisConnectImap4Server
// Mark the message for delete while offline
RUN_TEST_STEP 	100 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DeleteMessage_20
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-DoFullImap4Synchronisation
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-CheckChildrenCountRemoteInbox_20
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0020-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-FULL-SYNC-0020


START_TESTCASE	MSG-IMAP-FULL-SYNC-0021
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0021
//!	@SYMTestCaseDesc		The test aims to verify the the status of seen flag after a sync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					  ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Sets the full download limits.
//!					9.Connects to the IMAP server, performs a full synchronisation.
//!					10.Verifies the count of the messages received in the Inbox.
//!					11.Subscribe the local Drafts folder.Attempt to subscribe a remote invalid folder.
//!					12.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The seen flag is not updated after a sync.
//!	@SYMAuthor			Kavyashree.D
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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0021-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-CreateSmtpMessageFromEmailFile_21
RUN_TEST_STEP 	100 	T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-SendSmtpMessage_21
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-SetImap4FullDownloadLimits_21
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-ConnectImap4Server
// Sync the remotely created folder
RUN_TEST_STEP 	100 	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-DisConnectImap4Server
RUN_TEST_STEP   100 	T_MsgImapServer		CheckChildrenCountFlagBase	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0021-CheckChildrenCountFlagBase_21

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-FULL-SYNC-0021


START_TESTCASE	MSG-IMAP-FULL-SYNC-0022
//!	@SYMTestCaseID			MSG-IMAP-FULL-SYNC-0022
//!	@SYMTestCaseDesc		The test aims to verify the mails downloaded when a destination folder is set for sync.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5563
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					  ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Sets the full download limits, with the inbox sync limit set to a given value.
//!					9.Connects to the IMAP server, performs a full synchronisation.
//!					10.Verifies the count of the messages received in the Inbox.
//!					11.Again connect, perform a full sync and verify the count.
//!					12.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The messages are synced in inbox only.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0022-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0022-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-CreateSmtpMessageFromEmailFile_22
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-SendSmtpMessage_22
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-CheckChildrenCountSentItems_22
RUN_TEST_STEP	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-SetImap4FullDownloadLimits_22
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-DoFullImap4Synchronisation
RUN_TEST_STEP_RESULT 106 100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-CheckChildrenCountRemoteFolder_22
RUN_TEST_STEP  100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-CheckChildrenCountRemoteInbox_22
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0022-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-FULL-SYNC-0022


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0001
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0001
//!	@SYMTestCaseDesc		The test aims to verify the mails synced using the command KIMAP4MTMSynchronise on INBOX.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					 ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Sets the full download limits with the destination folder as INBOX.
//!					9.Connects to the IMAP server, performs a synchronisation on the INBOX.
//!					10.Verifies the count of the messages received in the Inbox.
//!					11.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages  are synced in INBOX.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0023-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0023-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-CreateSmtpMessageFromEmailFile_1
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-SendSmtpMessage_1
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-CreateSmtpMessageFromEmailFile1_1
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-SendSmtpMessage1_1
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-CheckChildrenCountSentItems_1
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-SetImap4FullDownloadLimits_1
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-DoFullImap4Synchronisation
// Sync on INBOX
RUN_TEST_STEP	100	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-Imap4Synchronisation_1
// Verify if all the messages sent are synced
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0023-CheckChildrenCountRemoteInbox1_1
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULLMAILBOX-SYNC-0001


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0002
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0002
//!	@SYMTestCaseDesc		The test aims to verify the mails synced using the command KIMAP4MTMSynchronise on DRAFTS.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					 IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					 ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Sets the full download limits.
//!					9.Connects to the IMAP server
//!					10.Performs a synchronisation.
//!					11.Downloads the mails.
//!					12.Copies the mails to the DRAFTS folder.
//!					13.DoFullSynchronisation on to delete mails on UnSubscribed folders(esp Draft in this case)
//!					14.Select Drafts Folder
//!					15.Synchronise with Selected Folder Using KIMAP4MTMSynchronise
//!					16.Verifies the count of the messages received in the DRAFTS.
//!					17.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages are synced in DRAFTS.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0024-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0024-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-CreateSmtpMessageFromEmailFile_2
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-SendSmtpMessage_2
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-CreateSmtpMessageFromEmailFile1_2
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-SendSmtpMessage1_2
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-CheckChildrenCountSentItems_2
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-SetImap4FullDownloadLimits_2
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-DoFullImap4Synchronisation
RUN_TEST_STEP	100	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-ImapInvokeAsyncFunction_2
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-ConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-CopyImapSelectionRemote_2
//2 Messages are copied to Drafts folder
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0024-CheckChildrenCountRemoteDrafts_2
//Ensure that Messages in drafts is 0 as  a result of FULLSYNC.
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0024-CheckChildrenCountRemoteDrafts_20
//Select Drafts Folder
RUN_TEST_STEP 	100 	T_MsgImapServer		SelectImapFolder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-SelectImapFolder_2
//Synchronise to Ensure that Message in remote Folder is synced to Drafts
RUN_TEST_STEP	100	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-Imap4Synchronisation_2
// Verify if all the messages sent are synced into DRAFTS
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0024-CheckChildrenCountRemoteDrafts_2
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULLMAILBOX-SYNC-0002


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0003
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0003
//!	@SYMTestCaseDesc		The test aims to verify the mails synced using the command KIMAP4MTMSynchronise on SENT ITEMS.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					 IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					 ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Sets the full download limits.
//!					9.Connects to the IMAP server
//!					10.Performs a synchronisation.
//!					11.Downloads the mails.
//!					12.Copies the mails to the Sent Items folder.
//!					13.DoFullSynchronisation on to delete mails on UnSubscribed folders(esp "Sent Items" in this case)
//!					14.Select "Sent Items" Folder
//!					15.Synchronise with Selected Folder Using KIMAP4MTMSynchronise
//!					16.Verifies the count of the messages received in the Sent Items
//!					17.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages  are synced in SENT ITEMS.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0025-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0025-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-CreateSmtpMessageFromEmailFile_3
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-SendSmtpMessage_3
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-CreateSmtpMessageFromEmailFile1_3
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-SendSmtpMessage1_3
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-CheckChildrenCountSentItems_3
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-SetImap4FullDownloadLimits_3
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-DoFullImap4Synchronisation
RUN_TEST_STEP	100	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-ImapInvokeAsyncFunction_3
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-ConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-CopyImapSelectionRemote_3
//2 Messages are copied to "Sent Items" folder
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0025-CheckChildrenCountRemoteSent_3
//Ensure that Messages in "Sent Items" is 0 as  a result of FULLSYNC.
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0025-CheckChildrenCountRemoteSent_30
//Select "Sent Items" Folder
RUN_TEST_STEP 	100 	T_MsgImapServer		SelectImapFolder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-SelectImapFolder_3
//Synchronise to Ensure that Message in remote Folder is synced to "Sent Items"
RUN_TEST_STEP	100	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-Imap4Synchronisation_3
// Verify if all the messages sent are synced into Sent Items
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0025-CheckChildrenCountRemoteSent_3
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULLMAILBOX-SYNC-0003


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0004
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0004
//!	@SYMTestCaseDesc		The test aims to verify the mails synced using the command KIMAP4MTMSynchronise on a User Created folder.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					 IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					 ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Sets the full download limits.
//!					9.Connects to the IMAP server
//!					10.Performs a synchronisation.
//!					11.Downloads the mails.
//!					12.Copies the mails to the User created folder.
//!					13.DoFullSynchronisation on to delete mails on UnSubscribed folders(esp testFolder in this case)
//!					14.Select testFolder Folder
//!					15.Synchronise with Selected Folder Using KIMAP4MTMSynchronise
//!					16.Verifies the count of the messages received in the User created folder.
//!					17.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages are synced in the User Created folder.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0026-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0026-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-CreateSmtpMessageFromEmailFile_4
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-SendSmtpMessage_4
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-CreateSmtpMessageFromEmailFile1_4
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-SendSmtpMessage1_4
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-CheckChildrenCountSentItems_4
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-SetImap4FullDownloadLimits_4
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-DoFullImap4Synchronisation
RUN_TEST_STEP	100	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-ImapInvokeAsyncFunction_4
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-ConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-CreateImap4Folder_4
RUN_TEST_STEP 	100 	T_MsgImapServer		FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-FindEntryByName_4
RUN_TEST_STEP 	100 	T_MsgImapServer		CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-CopyImapSelectionRemote_4
//2 Messages are copied to UserDefined folder
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0026-CheckChildrenCountRemoteFolder_4
//Ensure that Messages in UserDefined is 0 as  a result of FULLSYNC.
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0026-CheckChildrenCountRemoteFolder_40
//Select UserDefined Folder
RUN_TEST_STEP 	100 	T_MsgImapServer		SelectImapFolder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-SelectImapFolder_4
//Synchronise to Ensure that Message in remote Folder is synced to UserDefined
RUN_TEST_STEP	100	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-Imap4Synchronisation_4
// Verify if all the messages sent are synced into User Created folder.
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0026-CheckChildrenCountRemoteFolder_4
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULLMAILBOX-SYNC-0004


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0005
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0005
//!	@SYMTestCaseDesc		The test aims to verify the mails synced using the command KIMAP4MTMSynchronise on a 
//!					sub folder created under the Inbox.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					 IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					 ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Sets the full download limits.
//!					9.Connects to the IMAP server
//!					10.Performs a synchronisation.
//!					11.Downloads the mails.
//!					12.Copies the mails to the User created sub folder.
//!					13.DoFullSynchronisation on to delete mails on UnSubscribed folders(esp "testFolder" in this case)
//!					14.Select "testfolder" Folder
//!					15.Synchronise with Selected Folder Using KIMAP4MTMSynchronise
//!					16.Verifies the count of the messages received in the User created  sub folder.
//!					17.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages are synced in the sub folder created under the INBOX.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0027-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0027-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-CreateSmtpMessageFromEmailFile_5
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-SendSmtpMessage_5
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-CreateSmtpMessageFromEmailFile1_5
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-SendSmtpMessage1_5
RUN_TEST_STEP 	100 	T_MsgCommonServer  	CheckChildrenCount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-CheckChildrenCountSentItems_5
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-SetImap4FullDownloadLimits_5
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-DoFullImap4Synchronisation
RUN_TEST_STEP	100	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-ImapInvokeAsyncFunction_5
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-ConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-CreateImap4Folder_5
RUN_TEST_STEP 	100 	T_MsgImapServer		FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-FindEntryByName_5
RUN_TEST_STEP 	100 	T_MsgImapServer		CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-CopyImapSelectionRemote_5
//2 Messages are copied to testFolder folder
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0027-CheckChildrenCountRemoteFolder_5
//Ensure that Messages in testFolder is 0 as  a result of FULLSYNC.
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0027-CheckChildrenCountRemoteFolder_50
//Select testFolder Folder
RUN_TEST_STEP 	100 	T_MsgImapServer		SelectImapFolder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-SelectImapFolder_5
//Synchronise to Ensure that Message in remote Folder is synced to testFolder
RUN_TEST_STEP	100	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-Imap4Synchronisation_5
// Verify if all the messages sent are synced into User Created folder.
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   	0027-CheckChildrenCountRemoteFolder_5
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.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-FULLMAILBOX-SYNC-0005


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0006
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0006
//!	@SYMTestCaseDesc		The test aims to verify the mails synced when select & sync are done in two different set of connections.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					  ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the same IMAP account.
//!					8.Creates a folder.
//!					9.Connect to the IMAP server,Subscribe, select and sync the folder.
//!					10.Disconnect from the IMAP server.
//!					11.Connect to the IMAP server.
//!					12.Downloads the mails into INBOX.
//!					13.Copies the mails from INBOX to the User created folder.
//!					14.DoFullSynchronisation on to delete mails on UnSubscribed folders(esp testFolder in this case)
//!					15.Select testFolder Folder
//!					16. Disconnect
//!					17.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					18.Synchronise with Selected Folder Using KIMAP4MTMSynchronise
//!					19.Verifies the count of the messages received in the the User Created folder.
//!					20.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, All the messages are synced in the User created folder.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0028-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0028-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-CreateSmtpMessageFromEmailFile_6
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-SendSmtpMessage_6
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-SetImap4FullDownloadLimits_6
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-ConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImap4Folder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-CreateImap4Folder_6
RUN_TEST_STEP 	100 	T_MsgImapServer		FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-FindEntryByName_6
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-ImapInvokeAsyncFunction_6
RUN_TEST_STEP 	100 	T_MsgImapServer		CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0028-CopyImapSelectionRemote_6
//2 Messages are copied to Drafts folder
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0028-CheckChildrenCountRemoteFolder_6
//Ensure that Messages in testFolder is 0 as  a result of FULLSYNC.
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0028-CheckChildrenCountRemoteFolder_60
//Select testFolder Folder
RUN_TEST_STEP 	100 	T_MsgImapServer		SelectImapFolder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-SelectImapFolder_6
//Synchronise to Ensure that Message in remote Folder is synced to testFolder
// Sync on the folder
RUN_TEST_STEP	100	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-Imap4Synchronisation_6
// Verify if all the messages sent are synced into testFolder
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0028-CheckChildrenCountRemoteFolder_6
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-DisConnectImap4Server
//RUN_TEST_STEP	100	T_MsgImapServer		FindEntryByName			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0028-FindEntryByName0_6

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-FULLMAILBOX-SYNC-0006


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0007
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0007
//!	@SYMTestCaseDesc		The test aims to verify the mails synced when the Search string is specified
//!					for DRAFTS.
//!	@SYMTestPriority		High
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented   
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection.
//!					3.Resets the message store and central repository to default state.
//!					4.Creates an IMAP account by reading the settings from the file mentioned in the 
//!					  ini config file thus setting the IMAP and SMTP service settings.
//!					5.Connects to the IMAP server and performs full sync with IMAP4 server.
//!					6.Deletes all mails in the Inbox of the IMAP server.
//!					7.Creates a message from RFC822 file and sends the message to the IMAP account.
//!					8.Connects to the IMAP server, performs a synchronisation.
//!					9.Downloads the mails.
//!					10.Copies the mails from INBOX to the DRAFTS folder.
//!					11.Verifies the count of the messages received in DRAFTS.
//!					12.Sets the full download limits, with the Search String specified.
//!					  The Search String contains the subject of one of the mails sent.
//!					13.Subscribes, selects and syncs the DRAFTS folder.
//!					14.Verifies the count of the messages synced.
//!					15.Shutdown test steps are called to destroy the session, IMAP and SMTP MTM objects.
//!	@SYMTestExpectedResults		EPass, The message whose subject matches the Search String specified is synced, in the
//!					DRAFTS folder.
//!	@SYMAuthor			Kavyashree.D

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 100 T_MsgCommonServer 	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-InitNtRas
RUN_TEST_STEP 100 T_MsgCommonServer 	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-ResetMessageStore
RUN_TEST_STEP 100 T_MsgImapServer	CreateImapAccount		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CreateImapAccount
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0029-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0029-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0029-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0029-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0029-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-DisConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CreateSmtpMessageFromEmailFile_7
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-SendSmtpMessage_7
RUN_TEST_STEP 100 T_MsgSmtpServer    	CreateSmtpMessageFromEmailFile	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CreateSmtpMessageFromEmailFile1_7
RUN_TEST_STEP 100 T_MsgSmtpServer    	SendSmtpMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-SendSmtpMessage1_7
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0029-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	ImapInvokeAsyncFunction		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-ImapInvokeAsyncFunction_7
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CheckChildrenCountRemoteInbox_7
RUN_TEST_STEP 100 T_MsgImapServer	CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CopyImapSelectionRemote_7
//2 Messages are copied to Drafts folder
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CheckChildrenCountRemoteDrafts_7
//Ensure that Messages in drafts is 0 as  a result of FULLSYNC.
RUN_TEST_STEP 100 T_MsgImapServer	DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-DoFullImap4Synchronisation
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CheckChildrenCountRemoteDrafts_70
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-DisConnectImap4Server
// Set the download limits with the Search String specified.
RUN_TEST_STEP 100 T_MsgImapServer	SetImap4FullDownloadLimits	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-SetImap4FullDownloadLimits_7
RUN_TEST_STEP 100 T_MsgImapServer	ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-ConnectImap4Server
RUN_TEST_STEP 100 T_MsgImapServer	SelectImapFolder		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-SelectImapFolder_7
RUN_TEST_STEP 100 T_MsgImapServer	Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-Imap4Synchronisation_7
// Only the messages whose subject matches the Search String are synced.
RUN_TEST_STEP 100 T_MsgImapServer	CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-CheckChildrenCountRemoteDrafts1_7
RUN_TEST_STEP 100 T_MsgImapServer	DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    0029-DisConnectImap4Server

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

PRINT Execute Completed ################################################
END_TESTCASE MSG-IMAP-FULLMAILBOX-SYNC-0007


START_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0008
//!	@SYMTestCaseID			MSG-IMAP-FULLMAILBOX-SYNC-0008
//!	@SYMTestCaseDesc		To verify the messages synced when the flag KImap4EmailDeleteEmailsWhenDisconnecting flag is enabled,
//!					on the DRAFTS folder.
//!	@SYMTestPriority		Critical
//!   	@SYMTestType			CIT
//!  	@SYMTestStatus			Implemented  
//!	@SYMPREQ 			1160
//!	@SYMREQ				REQ 5562
//!	@SYMTestCaseDependencies	requires ced -i c:\ced_default_ras.cfg to set comms.
//!	@SYMTestActions			1.Startup test steps are called for the different servers to create session,
//!					  IMAP MTM and SMTP MTM objects.
//!					2.Initialises the RAS connection
//!					3.Resets the message store to clean up the central repository
//!					4.Creates an IMAP account by reading the settings from the file mentioned
//!					 thus setting the IMAP and SMTP service settings
//!					5.Deletes all mails in the Inbox on the server.
//!					6.Creates messages from RFC822 file and sends the messages to the same IMAP account.
//!					7.Sets the full download limits with the delete flag enabled, on the DRAFTS folder.
//!					8.Connect to the Server and perform a sync on the DRAFTS folder.
//!					9.Download the mails with IMAP4 KIMAP4MTMPopulate command.
//!					10.Delete the message,locally.
//!					11.Connect to the Imap Server.
//!					12.Perfrom full synchronisation.
//!					13.Disconnect from the Server.
//!					14.Verify the count of the messages in the DRAFTS folder.
//!	@SYMTestExpectedResults		EPass,The message received has been deleted from the DRAFTS folder of Imap server also.
//!	@SYMAuthor			Kavyashree.D

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	100	T_MsgCommonServer  	InitNtRas			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-InitNtRas
RUN_TEST_STEP	100	T_MsgCommonServer  	ResetMessageStore		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-ResetMessageStore
RUN_TEST_STEP 	100 	T_MsgImapServer		CreateImapAccount 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-CreateImapAccount 
RUN_TEST_STEP 	100 	T_MsgImapServer		ChangeImap4SubAndSyncSettings	c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0030-ChangeSubAndSyncSettings
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-DoFullImap4Synchronisation
RUN_TEST_STEP 	100 	T_MsgImapServer		InitialiseImap4Account		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-InitialiseImap4Account
RUN_TEST_STEP	100	T_MsgImapServer		DoFullImap4Synchronisation	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-DoFullImap4Synchronisation
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-CheckChildrenCountRemoteInbox
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-DisConnectImap4Server
RUN_TEST_STEP 	100 	T_MsgSmtpServer		CreateSmtpMessageFromEmailFile 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-CreateSmtpMessageFromEmailFile_8
RUN_TEST_STEP 	100 	T_MsgSmtpServer		SendSmtpMessage 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-SendSmtpMessage_8
// Enable the flag KImap4EmailDeleteEmailsWhenDisconnecting 
RUN_TEST_STEP 	100 	T_MsgImapServer		SetImap4FullDownloadLimits 	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-SetImap4FullDownloadLimits_8
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-ConnectImap4Server
RUN_TEST_STEP	100 	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0030-Imap4SynchronisationInbox_8
RUN_TEST_STEP 	100 	T_MsgImapServer		ImapInvokeAsyncFunction      	c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-ImapInvokeAsyncFunction_8
RUN_TEST_STEP 	100 	T_MsgImapServer		CopyImapSelectionRemote		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0030-CopyImapSelectionRemote_8
RUN_TEST_STEP 	100 	T_MsgImapServer		CheckChildrenCountImap		c:\msgtest\email\imap\sync\msg-imap-sync1.ini    		0030-CheckChildrenCountRemoteDrafts_8
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-DisConnectImap4Server
// Mark the message for delete while offline
RUN_TEST_STEP 	100 	T_MsgImapServer		DeleteMessage			c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-DeleteMessage_8
RUN_TEST_STEP 	100 	T_MsgImapServer		ConnectImap4Server		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-ConnectImap4Server
RUN_TEST_STEP	100	T_MsgImapServer		Imap4Synchronisation		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-Imap4Synchronisation
// Verify if the message is deleted
RUN_TEST_STEP  	100 	T_MsgImapServer		CheckChildrenCountImap 		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-CheckChildrenCountRemoteDrafts0_8
RUN_TEST_STEP 	100 	T_MsgImapServer		DisConnectImapServer		c:\msgtest\email\imap\sync\msg-imap-sync1.ini   		0030-DisConnectImap4Server

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

PRINT Execute Completed ################################################
END_TESTCASE	MSG-IMAP-FULLMAILBOX-SYNC-0008



