Home | History | Annotate | Download | only in email

Lines Matching defs:attachments

192      * Sunny day test of adding attachments from an IMAP/POP message.
195 // Prepare a local message to add the attachments to
219 ArrayList<Part> attachments = new ArrayList<Part>();
220 MimeUtility.collectParts(legacyMessage, viewables, attachments);
221 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
223 // Read back all attachments for message and check field values
232 checkAttachment("attachment1Part", attachments.get(0), attachment,
235 checkAttachment("attachment2Part", attachments.get(1), attachment,
247 * Test that only "attachment" or "inline" attachments are captured and added.
252 // Prepare a local message to add the attachments to
256 // Prepare the three attachments we want to test
286 // Prepare local message (destination) and legacy message w/attachments (source)
292 // Run the conversion and check for the converted attachments - this test asserts
293 // that there are two attachments numbered 100 & 101 (so will fail if it finds 102)
298 * Test that attachments aren't re-added in the DB. This supports the "partial download"
302 // Prepare a local message to add the attachments to
308 // Prepare a legacy message with attachments
313 ArrayList<Part> attachments = new ArrayList<Part>();
314 MimeUtility.collectParts(legacyMessage, viewables, attachments);
315 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
321 // Now add the attachments again and confirm there are still only two
322 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
328 attachments = new ArrayList<Part>();
329 MimeUtility.collectParts(legacyMessage, viewables, attachments);
330 LegacyConversions.updateAttachments(mProviderContext, localMessage, attachments);
335 * Prepare a legacy message with 1+ attachments
336 * @param numAttachments how many attachments to add
371 * Prepare a legacy message with 1+ attachments
372 * @param attachments array containing one or more attachments
374 private Message prepareLegacyMessageWithAttachments(BodyPart[] attachments)
376 // Build the multipart that holds the attachments
378 for (int i = 0; i < attachments.length; ++i) {
379 mpBuilder.addBodyPart(attachments[i]);
450 * TODO: Sunny day test of adding attachments from a POP message.
534 ArrayList<Part> attachments = new ArrayList<Part>();
535 MimeUtility.collectParts(actual, viewables, attachments);
581 // TODO Check the attachments
583 // cv.put("attachment_count", attachments.size());