Package org.apache.james.mailbox.model

Examples of org.apache.james.mailbox.model.MailboxPath


    }

    private static void fillMailboxList() {
        mailboxList = new ArrayList<HBaseMailbox>();
        pathsList = new ArrayList<MailboxPath>();
        MailboxPath path;
        String name;
        for (int i = 0; i < NAMESPACES; i++) {
            for (int j = 0; j < USERS; j++) {
                for (int k = 0; k < MAILBOX_NO; k++) {
                    if (j == 3) {
                        name = "test" + SEPARATOR + "subbox" + k;
                    } else {
                        name = "mailbox" + k;
                    }
                    path = new MailboxPath("namespace" + i, "user" + j, name);
                    pathsList.add(path);
                    mailboxList.add(new HBaseMailbox(path, 13));
                }
            }
        }
View Full Code Here


     * Test of lastUid method, of class HBaseUidProvider.
     */
    @Test
    public void testLastUid() throws Exception {
        LOG.info("lastUid");
        final MailboxPath path = new MailboxPath("gsoc", "ieugen", "Trash");
        final HBaseMailbox newBox = new HBaseMailbox(path, 1234);
        mapper.save(newBox);
        mailboxList.add(newBox);
        pathsList.add(path);

View Full Code Here

     */
    @Test
    public void testHighestModSeq() throws Exception {
        LOG.info("highestModSeq");
        LOG.info("lastUid");
        MailboxPath path = new MailboxPath("gsoc", "ieugen", "Trash");
        HBaseMailbox newBox = new HBaseMailbox(path, 1234);
        mapper.save(newBox);
        mailboxList.add(newBox);
        pathsList.add(path);

View Full Code Here

     * Test of getter and setter for MailboxId
     */
    @Test
    public void testGetSetMailboxId() {
        System.out.println("getSetMailboxId");
        final MailboxPath mailboxPath = new MailboxPath("gsoc", "ieugen", "INBOX");
        final HBaseMailbox instance = new HBaseMailbox(mailboxPath, 10);

        UUID expResult = UUID.randomUUID();
        instance.setMailboxId(expResult);
        assertEquals(expResult, instance.getMailboxId());
View Full Code Here

     * Test of getter and setter for Namespace, of class HBaseMailbox.
     */
    @Test
    public void testGetSetNamespace() {
        System.out.println("getSetNamespace");
        final MailboxPath mailboxPath = new MailboxPath("gsoc", "ieugen", "INBOX");
        final HBaseMailbox instance = new HBaseMailbox(mailboxPath, 124566);
        String result = instance.getNamespace();
        assertEquals(mailboxPath.getNamespace(), result);

        instance.setNamespace("newName");
        assertEquals("newName", instance.getNamespace());

    }
View Full Code Here

     * Test of getter and setter for User, of class HBaseMailbox.
     */
    @Test
    public void testGetSetUser() {
        System.out.println("getUser");
        final MailboxPath mailboxPath = new MailboxPath("gsoc", "ieugen", "INBOX");
        final HBaseMailbox instance = new HBaseMailbox(mailboxPath, 12);
        String result = instance.getUser();
        assertEquals(mailboxPath.getUser(), result);

        instance.setUser("eric");
        assertEquals("eric", instance.getUser());
    }
View Full Code Here

     * Test of getter and setter for Name, of class HBaseMailbox.
     */
    @Test
    public void testGetSetName() {
        System.out.println("getSetName");
        final MailboxPath mailboxPath = new MailboxPath("gsoc", "ieugen", "INBOX");
        final HBaseMailbox instance = new HBaseMailbox(mailboxPath, 1677);
        String result = instance.getName();
        assertEquals(mailboxPath.getName(), result);

        instance.setName("newINBOX");
        assertEquals("newINBOX", instance.getName());
    }
View Full Code Here

     * Test of getUidValidity method, of class HBaseMailbox.
     */
    @Test
    public void testGetUidValidity() {
        System.out.println("getUidValidity");
        final MailboxPath mailboxPath = new MailboxPath("gsoc", "ieugen", "INBOX");
        final HBaseMailbox instance = new HBaseMailbox(mailboxPath, 123345);
        long expResult = 123345L;
        long result = instance.getUidValidity();
        assertEquals(expResult, result);

View Full Code Here

     * Test of hashCode method, of class HBaseMailbox.
     */
    @Test
    public void testHashCode() {
        System.out.println("hashCode");
        final MailboxPath mailboxPath = new MailboxPath("gsoc", "ieugen", "INBOX");
        final HBaseMailbox instance = new HBaseMailbox(mailboxPath, 1234);
        // from the hashCode()
        final int PRIME = 31;
        int result = 1;
        UUID mailboxId = instance.getMailboxId();
View Full Code Here

     * Test of equals method, of class HBaseMailbox.
     */
    @Test
    public void testEquals() {
        System.out.println("equals");
        final MailboxPath mailboxPath = new MailboxPath("gsoc", "ieugen", "INBOX");
        final HBaseMailbox instance = new HBaseMailbox(mailboxPath, 12345);
        final HBaseMailbox instance2 = new HBaseMailbox(mailboxPath, 12345);
        instance2.setMailboxId(instance.getMailboxId());
        assertEquals(instance, instance2);
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.model.MailboxPath

Copyright © 2018 www.massapicom. 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.