FileDocCategorySizeDatePackage
MimeBodyPartTest.javaAPI DocAndroid 1.5 API1717Wed May 06 22:42:46 BST 2009com.android.email.mail.internet

MimeBodyPartTest

public class MimeBodyPartTest extends TestCase
This is a series of unit tests for the MimeBodyPart class. These tests must be locally complete - no server(s) required.

Fields Summary
Constructors Summary
Methods Summary
public voidtestGetContentId()

        MimeBodyPart bp = new MimeBodyPart();

        // no content-id
        assertNull(bp.getContentId());

        // normal case
        final String cid1 = "cid.1@android.com";
        bp.setHeader(MimeHeader.HEADER_CONTENT_ID, cid1);
        assertEquals(cid1, bp.getContentId());

        // surrounded by optional bracket
        bp.setHeader(MimeHeader.HEADER_CONTENT_ID, "<" + cid1 + ">");
        assertEquals(cid1, bp.getContentId());