messagingfw/msgtestfw/TestCases/ScriptedTestCases/AttachmentAPIScripts/12-SMTP_RemoveAllAttachmentsUsingAttachmentId.SCRIPT
changeset 0 8e480a14352b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingfw/msgtestfw/TestCases/ScriptedTestCases/AttachmentAPIScripts/12-SMTP_RemoveAllAttachmentsUsingAttachmentId.SCRIPT	Mon Jan 18 20:36:02 2010 +0200
@@ -0,0 +1,113 @@
+//
+// 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:
+//
+
+
+// Test Case Name:
+//	Removing all attachments using attachment Id
+// ------------------------------------------
+// Component Under Test:
+//	Attachment API
+// ------------------------------------------
+// API function under test:
+//	MMsvAttachmentManager::GetAttachmentInfoL
+//	MMsvAttachmentManager::RemoveAttachmentL
+// ------------------------------------------
+// Requirement/Use Case/Functional Spec:
+//	SGL.GT0216.051 (2.1, 2.3.1, 2.3.4)
+// ------------------------------------------
+// Polarity:
+//	Positive
+// ------------------------------------------
+// Test Type (unit, integration, panic, performance, conformance, stress, or interoperability):
+//	Integration
+// ------------------------------------------
+// Expected Panic ID (if a panic test, only for non-scripted test cases):
+//	N/A
+// ------------------------------------------
+// Interface Dependencies (does it require connection, which subsystems does it require):
+// 	Requires connection to Messaging Server
+// ------------------------------------------
+// Importance (critical, high, or low):
+//	High
+// ------------------------------------------
+// Execution Time (fast, medium, or slow):
+//	Medium
+// ------------------------------------------
+// Pre-condition description:
+//	1. New SMTP message with atleat 4 attachments in drafts folder
+//	2. Read/Write access to message store
+// ------------------------------------------
+// Action Description:
+// 	1. Get attachment count
+//	2. Loop through the (0 to AttachmentCount-1) 
+//		2.1 Get attachment Id
+//		2.2 Remove attachment providing attachment Id obtained
+// ------------------------------------------
+// Post-condition description (i.e., expected outcome):
+//	The attachment count is 0
+// ------------------------------------------
+// Reference to a review document:
+//	AttachmentAPI_TestSpecificationDocument_Ver1.0.doc
+// ------------------------------------------
+// Full pathname of an epoc.ini (if there are special epoc.ini requirements)
+// 	For emulator, an epoc.ini that creates an emulated external drive (drive letter 
+//	between D: and Y:) is required. Optionally, an environment variable can be defined.
+// ------------------------------------------
+// Any CommDb restrictions:
+//	NTRAS CommDb
+// ------------------------------------------
+// Build Requirements (e.g., no watchers):
+//	N/A
+// ------------------------------------------
+// Hardware Requirements
+//	H2 Board
+// ------------------------------------------
+
+
+RUN_UTILS DeleteFile c:\messaging.db
+LOAD_SUITE MessagingTestServer -SharedData
+
+RUN_TEST_STEP 100 MessagingTestServer BEGIN_TEST_CASE
+
+RUN_TEST_STEP 100 MessagingTestServer SETUP_TEST_CASE
+RUN_TEST_STEP 100 MessagingTestServer GetBaseConstants				c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI GetConstants
+RUN_TEST_STEP 100 MessagingTestServer GetSMTPMTMUId				c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpMTMUId
+RUN_TEST_STEP 100 MessagingTestServer CreateSession				c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SessionId
+RUN_TEST_STEP 100 MessagingTestServer CreateRegistry				c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI CreateRegistry
+RUN_TEST_STEP 100 MessagingTestServer CreateService				c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI CreateSmtpService
+
+RUN_TEST_STEP 100 MessagingTestServer CreateMessage				c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI CreateMessageEntry
+RUN_TEST_STEP 100 MessagingTestServer MoveEntry					c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI MoveEntry
+RUN_TEST_STEP 100 MessagingTestServer FindEntryByName				c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI FindEntryByName
+
+RUN_TEST_STEP 100 MessagingTestServer SetDefaultConfiguration			c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SetDefaultConfigurationEMailFile
+RUN_TEST_STEP 100 MessagingTestServer CreateSmtpMessageFromEmailFile		c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI CreateSmtpMessageFromEmailFile
+RUN_TEST_STEP 100 MessagingTestServer SmtpCreateAttachment			c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpCreateAttachment
+RUN_TEST_STEP 100 MessagingTestServer SmtpAddFileAttachmentByHandleSync		c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpAddFileAttachmentByHandle
+RUN_TEST_STEP 100 MessagingTestServer SmtpAddFileAttachmentByPath		c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpAddFileAttachmentByPath
+RUN_TEST_STEP 100 MessagingTestServer SmtpAddEntryAttachment			c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpAddEntryAttachment
+RUN_TEST_STEP 100 MessagingTestServer SmtpCountAttachments			c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpCountAttachments0
+
+RUN_TEST_STEP 100 MessagingTestServer EXECUTE_TEST_CASE
+RUN_TEST_STEP 100 MessagingTestServer SmtpRemoveFileAttachmentById		c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpRemoveFileAttachmentById0
+RUN_TEST_STEP 100 MessagingTestServer SmtpRemoveFileAttachmentById		c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpRemoveFileAttachmentById1
+RUN_TEST_STEP 100 MessagingTestServer SmtpRemoveFileAttachmentById		c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpRemoveFileAttachmentById2
+RUN_TEST_STEP 100 MessagingTestServer SmtpRemoveEntryAttachmentById		c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpRemoveEntryAttachmentById
+
+RUN_TEST_STEP 100 MessagingTestServer CHECK_POSTCONDITIONS
+RUN_TEST_STEP 100 MessagingTestServer SmtpCountAttachments			c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\12-SMTP_RemoveAllAttachmentsUsingAttachmentId.INI SmtpCountAttachments1
+
+RUN_TEST_STEP 100 MessagingTestServer END_TEST_CASE