Home | History | Annotate | Download | only in email

Lines Matching defs:attachments

80      * Sunny day test of adding attachments from an IMAP/POP message.
83 // Prepare a local message to add the attachments to
107 ArrayList<Part> attachments = new ArrayList<Part>();
108 MimeUtility.collectParts(legacyMessage, viewables, attachments);
109 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
111 // Read back all attachments for message and check field values
121 checkAttachment("attachment1Part", attachments.get(0), attachment,
124 checkAttachment("attachment2Part", attachments.get(1), attachment,
136 * Test that only "attachment" or "inline" attachments are captured and added.
141 // Prepare a local message to add the attachments to
145 // Prepare the three attachments we want to test
175 // Prepare local message (destination) and legacy message w/attachments (source)
181 // Run the conversion and check for the converted attachments - this test asserts
182 // that there are two attachments numbered 100 & 101 (so will fail if it finds 102)
187 * Test that attachments aren't re-added in the DB. This supports the "partial download"
191 // Prepare a local message to add the attachments to
197 // Prepare a legacy message with attachments
202 ArrayList<Part> attachments = new ArrayList<Part>();
203 MimeUtility.collectParts(legacyMessage, viewables, attachments);
204 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
210 // Now add the attachments again and confirm there are still only two
211 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
217 attachments = new ArrayList<Part>();
218 MimeUtility.collectParts(legacyMessage, viewables, attachments);
219 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
224 * Prepare a legacy message with 1+ attachments
225 * @param numAttachments how many attachments to add
260 * Prepare a legacy message with 1+ attachments
261 * @param attachments array containing one or more attachments
263 private Message prepareLegacyMessageWithAttachments(BodyPart[] attachments)
265 // Build the multipart that holds the attachments
267 for (int i = 0; i < attachments.length; ++i) {
268 mpBuilder.addBodyPart(attachments[i]);
321 * TODO: Sunny day test of adding attachments from a POP message.
386 ArrayList<Part> attachments = new ArrayList<Part>();
387 MimeUtility.collectParts(actual, viewables, attachments);
401 // TODO Check the attachments
403 // cv.put("attachment_count", attachments.size());