|
1 // |
|
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 |
|
17 |
|
18 // Test Case Name: |
|
19 // Add attachment to the message where attachment is from private area |
|
20 // ------------------------------------------ |
|
21 // Component Under Test: |
|
22 // Attachment API |
|
23 // ------------------------------------------ |
|
24 // API function under test: |
|
25 // MMsvAttachmentManager::AddAttachmentL |
|
26 // ------------------------------------------ |
|
27 // Requirement/Use Case/Functional Spec: |
|
28 // SGL.GT0216.051 (2.1, 2.3.1, 2.3.3, 2.3.4) |
|
29 // ------------------------------------------ |
|
30 // Polarity: |
|
31 // Positive |
|
32 // ------------------------------------------ |
|
33 // Test Type (unit, integration, panic, performance, conformance, stress, or interoperability): |
|
34 // Integration |
|
35 // ------------------------------------------ |
|
36 // Expected Panic ID (if a panic test, only for non-scripted test cases): |
|
37 // N/A |
|
38 // ------------------------------------------ |
|
39 // Interface Dependencies (does it require connection, which subsystems does it require): |
|
40 // Requires connection to Messaging Server |
|
41 // ------------------------------------------ |
|
42 // Importance (critical, high, or low): |
|
43 // High |
|
44 // ------------------------------------------ |
|
45 // Execution Time (fast, medium, or slow): |
|
46 // Medium |
|
47 // ------------------------------------------ |
|
48 // Pre-condition description: |
|
49 // 1. New SMTP message in drafts folder |
|
50 // 2. Read/Write access to message store |
|
51 // ------------------------------------------ |
|
52 // Action Description: |
|
53 // 1. Open the file to be attached in read only mode |
|
54 // 2. Add the file opened as attachment to the message entry providing the file handle |
|
55 // ------------------------------------------ |
|
56 // Post-condition description (i.e., expected outcome): |
|
57 // The attachment count is 1 |
|
58 // ------------------------------------------ |
|
59 // Reference to a review document: |
|
60 // AttachmentAPI_TestSpecificationDocument_Ver1.0.doc |
|
61 // ------------------------------------------ |
|
62 // Full pathname of an epoc.ini (if there are special epoc.ini requirements) |
|
63 // For emulator, an epoc.ini that creates an emulated external drive (drive letter |
|
64 // between D: and Y:) is required. Optionally, an environment variable can be defined. |
|
65 // ------------------------------------------ |
|
66 // Any CommDb restrictions: |
|
67 // NTRAS CommDb |
|
68 // ------------------------------------------ |
|
69 // Build Requirements (e.g., no watchers): |
|
70 // N/A |
|
71 // ------------------------------------------ |
|
72 // Hardware Requirements |
|
73 // H2 Board |
|
74 // ------------------------------------------ |
|
75 |
|
76 |
|
77 RUN_UTILS DeleteFile c:\messaging.db |
|
78 LOAD_SUITE MessagingTestServer -SharedData |
|
79 |
|
80 RUN_TEST_STEP 100 MessagingTestServer BEGIN_TEST_CASE |
|
81 |
|
82 RUN_TEST_STEP 100 MessagingTestServer SETUP_TEST_CASE |
|
83 RUN_TEST_STEP 100 MessagingTestServer GetBaseConstants c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini GetConstants |
|
84 RUN_TEST_STEP 100 MessagingTestServer GetSMTPMTMUId c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini SmtpMTMUId |
|
85 RUN_TEST_STEP 100 MessagingTestServer CreateSession c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini SessionId |
|
86 RUN_TEST_STEP 100 MessagingTestServer CreateRegistry c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini CreateRegistry |
|
87 RUN_TEST_STEP 100 MessagingTestServer CreateService c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini CreateSmtpService |
|
88 RUN_TEST_STEP 100 MessagingTestServer SetDefaultConfiguration c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini SetDefaultConfigurationEMailFile |
|
89 RUN_TEST_STEP 100 MessagingTestServer CreateSmtpMessageFromEmailFile c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini CreateSmtpMessageFromEmailFile |
|
90 |
|
91 RUN_TEST_STEP 100 MessagingTestServer EXECUTE_TEST_CASE |
|
92 RUN_TEST_STEP 100 MessagingTestServer SmtpAddFileAttachmentByHandleSync c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini SmtpAddFileAttachmentByHandle |
|
93 |
|
94 RUN_TEST_STEP 100 MessagingTestServer CHECK_POSTCONDITIONS |
|
95 RUN_TEST_STEP 100 MessagingTestServer SmtpCountAttachments c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\02-SMTP_AddAttachmentFromPrivateArea.ini SmtpCountAttachments |
|
96 |
|
97 RUN_TEST_STEP 100 MessagingTestServer END_TEST_CASE |