Examples of MailboxQuery


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

        //        + SECOND_PART + ".Whatever."));
    }

    @Test
    public void testFreeLocalMixedWildcards() throws Exception {
        MailboxQuery expression = create(SECOND_PART + '*' + PART + '%'
                + SECOND_PART);
        assertTrue(expression.isExpressionMatch(SECOND_PART + PART
                + SECOND_PART));
        assertTrue(expression.isExpressionMatch(SECOND_PART + '.' + PART
                + SECOND_PART));
        assertFalse(expression.isExpressionMatch(SECOND_PART + PART + '.'
                + SECOND_PART));
        assertTrue(expression.isExpressionMatch(SECOND_PART + PART + "Whatever"
                + SECOND_PART));
        assertFalse(expression.isExpressionMatch(SECOND_PART + PART
                + SECOND_PART + ".Whatever."));
        assertTrue(expression.isExpressionMatch(SECOND_PART + '.' + PART
                + SECOND_PART));
        assertFalse(expression.isExpressionMatch(SECOND_PART + '.' + PART
                + SECOND_PART + '.' + SECOND_PART));
        assertTrue(expression.isExpressionMatch(SECOND_PART + '.' + PART + '.'
                + SECOND_PART + PART + SECOND_PART));
    }
View Full Code Here

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

                + SECOND_PART + PART + SECOND_PART));
    }
   
    @Test
    public void testTwoLocalWildcardsShouldMatchMailboxs() throws Exception {
        MailboxQuery expression = create("%.%");
        assertFalse(expression.isExpressionMatch(PART));
        assertFalse(expression.isExpressionMatch(PART + '.' + SECOND_PART + '.' + SECOND_PART));
        assertTrue(expression.isExpressionMatch(PART + '.' + SECOND_PART));
    }
View Full Code Here

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

        assertTrue(expression.isExpressionMatch(PART + '.' + SECOND_PART));
    }
   
    @Test
    public void testMailbox65() throws Exception {
        MailboxQuery expression = create("*.test");
        assertTrue(expression.isExpressionMatch("blah.test"));
        assertFalse(expression.isExpressionMatch("blah.test.go"));

        assertFalse(expression.isExpressionMatch("blah.test3"));

    }
View Full Code Here

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

    private static final String BASE = "BASE";
    private static final MailboxPath BASE_PATH = new MailboxPath(null, null, BASE);


    private MailboxQuery create(String expression) {
        return new MailboxQuery(BASE_PATH, expression, '.');
    }
View Full Code Here

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

        assertFalse(create("ONE").isWild());
    }

    @Test
    public void testCombinedNameEmptyPart() throws Exception {
        MailboxQuery expression = new MailboxQuery(BASE_PATH, "", '.');
        assertEquals(BASE, expression.getCombinedName());
    }
View Full Code Here

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

        assertEquals(BASE, expression.getCombinedName());
    }

    @Test
    public void testNullCombinedName() throws Exception {
        MailboxQuery expression = new MailboxQuery(new MailboxPath(null, null, null), null, '.');
        assertNotNull(expression.getCombinedName());
    }
View Full Code Here

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

        assertNotNull(expression.getCombinedName());
    }

    @Test
    public void testSimpleCombinedName() throws Exception {
        MailboxQuery expression = create(PART);
        assertEquals(BASE + "." + PART, expression.getCombinedName());
    }
View Full Code Here

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

        assertEquals(BASE + "." + PART, expression.getCombinedName());
    }

    @Test
    public void testCombinedNamePartStartsWithDelimiter() throws Exception {
        MailboxQuery expression = create("." + PART);
        assertEquals(BASE + "." + PART, expression.getCombinedName());
    }
View Full Code Here

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

        assertEquals(BASE + "." + PART, expression.getCombinedName());
    }

    @Test
    public void testCombinedNameBaseEndsWithDelimiter() throws Exception {
        MailboxQuery expression = new MailboxQuery(new MailboxPath(null, null, BASE + '.'), PART, '.');
        assertEquals(BASE + "." + PART, expression.getCombinedName());
    }
View Full Code Here

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

    }

    @Test
    public void testCombinedNameBaseEndsWithDelimiterPartStarts()
            throws Exception {
        MailboxQuery expression = new MailboxQuery(new MailboxPath(null, null, BASE + '.'), '.' + PART, '.');
        assertEquals(BASE + "." + PART, expression.getCombinedName());
    }
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.