Examples of MailboxItem


Examples of com.ripariandata.timberwolf.mail.MailboxItem

    }

    @Test
    public void testWriteAllHeaders() throws IOException
    {
        MailboxItem mail = mockMailboxItem("key", "Here's an email.", "Subject!!", "11 o'clock", "jim@example.com",
                                           "james@example.com", "j@example.com", "jane@example.com");
        ArrayList<MailboxItem> mails = new ArrayList<MailboxItem>();
        mails.add(mail);
        SequenceFile.Reader reader = writeMails(mails);
View Full Code Here

Examples of com.ripariandata.timberwolf.mail.MailboxItem

    }

    @Test
    public void testWriteSomeHeaders() throws IOException
    {
        MailboxItem mail = mockMailboxItem("key", "Body of an email.", null, "12 o'clock", null, null, null,
                                           "j@example.com");
        ArrayList<MailboxItem> mails = new ArrayList<MailboxItem>();
        mails.add(mail);
        SequenceFile.Reader reader = writeMails(mails);
View Full Code Here

Examples of com.ripariandata.timberwolf.mail.MailboxItem

    }

    @Test
    public void testWriteMailWithNoHeaders() throws IOException
    {
        MailboxItem mail = mock(MailboxItem.class);
        String[] headers = {"Item ID" };
        when(mail.getHeaderKeys()).thenReturn(headers);
        when(mail.hasKey(any(String.class))).thenReturn(true);
        when(mail.getHeader("Item ID")).thenReturn("key");
        ArrayList<MailboxItem> mails = new ArrayList<MailboxItem>();
        mails.add(mail);
        SequenceFile.Reader reader = writeMails(mails);

        char separator = 0x1F;
View Full Code Here

Examples of com.ripariandata.timberwolf.mail.MailboxItem

public class ConsoleMailWriterTest extends ConsoleTestBase
{
    @Test
    public void testWrite() throws IOException
    {
        MailboxItem item1 = mock(MailboxItem.class);
        when(item1.getHeaderKeys()).thenReturn(new String[] {"Body", "Recipient", "CC", "BCC"});
        when(item1.getHeader("Body")).thenReturn("Body text");
        when(item1.getHeader("Recipient")).thenReturn("to@me.com");
        when(item1.getHeader("CC")).thenReturn("fake@names3.com");
        when(item1.getHeader("BCC")).thenReturn("fake@names.com;fake2@names.com");

        MailboxItem item2 = mock(MailboxItem.class);
        when(item2.getHeaderKeys()).thenReturn(new String[]{"Room", "Time", "Importance"});
        when(item2.getHeader("Room")).thenReturn("Body text");
        when(item2.getHeader("Time")).thenReturn("Tuesday December 5th");
        when(item2.getHeader("Importance")).thenReturn("Low");

        ArrayList<MailboxItem> items = new ArrayList<MailboxItem>();
        items.add(item1);
        items.add(item2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.