|
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 // Removing attachment using index value |
|
20 // ------------------------------------------ |
|
21 // Component Under Test: |
|
22 // Attachment API |
|
23 // ------------------------------------------ |
|
24 // API function under test: |
|
25 // MMsvAttachmentManager::RemoveAttachmentL |
|
26 // ------------------------------------------ |
|
27 // Requirement/Use Case/Functional Spec: |
|
28 // SGL.GT0216.051 (2.1, 2.3.1, 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 BT message with atleast 3 attachments |
|
50 // 2. Read/Write access to message store |
|
51 // ------------------------------------------ |
|
52 // Action Description: |
|
53 // Remove the desired attachment providing valid index value |
|
54 // ------------------------------------------ |
|
55 // Post-condition description (i.e., expected outcome): |
|
56 // 1. The attachment count should be 1 less than before |
|
57 // 2. The comparison of attachment file removed with other 2 attachments should fail |
|
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 RUN_UTILS DeleteFile c:\messaging.db |
|
77 LOAD_SUITE MessagingTestServer -SharedData |
|
78 |
|
79 RUN_TEST_STEP 100 MessagingTestServer BEGIN_TEST_CASE |
|
80 |
|
81 RUN_TEST_STEP 100 MessagingTestServer SETUP_TEST_CASE |
|
82 RUN_TEST_STEP 100 MessagingTestServer GetBaseConstants c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI GetConstants |
|
83 RUN_TEST_STEP 100 MessagingTestServer GetBTMTMUId c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI GetBtMTMUId |
|
84 RUN_TEST_STEP 100 MessagingTestServer CreateSession c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI SessionId |
|
85 RUN_TEST_STEP 100 MessagingTestServer CreateRegistry c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI CreateRegistry |
|
86 RUN_TEST_STEP 100 MessagingTestServer CreateService c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI CreateBtService |
|
87 RUN_TEST_STEP 100 MessagingTestServer CreateMessage c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI CreateMessage |
|
88 RUN_TEST_STEP 100 MessagingTestServer AddFileAttachmentByHandleSync c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI AddFileAttachmentByHandleSync |
|
89 RUN_TEST_STEP 100 MessagingTestServer AddFileAttachmentByPath c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI AddFileAttachmentByPath |
|
90 RUN_TEST_STEP 100 MessagingTestServer AddLinkedAttachment c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI AddLinkedAttachment |
|
91 |
|
92 RUN_TEST_STEP 100 MessagingTestServer EXECUTE_TEST_CASE |
|
93 RUN_TEST_STEP 100 MessagingTestServer RemoveFileAttachmentByIndex c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI RemoveFileAttachmentByIndex |
|
94 |
|
95 RUN_TEST_STEP 100 MessagingTestServer CHECK_POSTCONDITIONS |
|
96 RUN_TEST_STEP 100 MessagingTestServer CountAttachments c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI CountAttachments |
|
97 RUN_TEST_STEP 100 MessagingTestServer CompareAttachment c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI CompareAttachment0 |
|
98 RUN_TEST_STEP 100 MessagingTestServer CompareAttachment c:\msgtest\TestFramework\ScriptedTestCases\AttachmentAPIScripts\10-BT_RemoveAttachmentUsingIndex.INI CompareAttachment1 |
|
99 |
|
100 RUN_TEST_STEP 100 MessagingTestServer END_TEST_CASE |