Package org.apache.james.imap.api.message.request

Examples of org.apache.james.imap.api.message.request.SearchKey


        checkInvalid("unsee\r\n", key);
    }

    @Test
    public void testShouldParseUndraft() throws Exception {
        SearchKey key = SearchKey.buildUndraft();
        checkValid("UNDRAFT\r\n", key);
        checkValid("undraft\r\n", key);
        checkValid("UnDraft\r\n", key);
        checkInvalid("u\r\n", key);
        checkInvalid("un\r\n", key);
View Full Code Here


        checkInvalid("undraf\r\n", key);
    }

    @Test
    public void testShouldParseUnflagged() throws Exception {
        SearchKey key = SearchKey.buildUnflagged();
        checkValid("UNFLAGGED\r\n", key);
        checkValid("unflagged\r\n", key);
        checkValid("UnFlagged\r\n", key);
        checkInvalid("u\r\n", key);
        checkInvalid("un\r\n", key);
View Full Code Here

        checkInvalid("unflagge\r\n", key);
    }

    @Test
    public void testShouldParseSeen() throws Exception {
        SearchKey key = SearchKey.buildSeen();
        checkValid("SEEN\r\n", key);
        checkValid("seen\r\n", key);
        checkValid("SEen\r\n", key);
        checkInvalid("s\r\n", key);
        checkInvalid("se\r\n", key);
View Full Code Here

        checkInvalid("see\r\n", key);
    }

    @Test
    public void testShouldParseNew() throws Exception {
        SearchKey key = SearchKey.buildNew();
        checkValid("NEW\r\n", key);
        checkValid("new\r\n", key);
        checkValid("NeW\r\n", key);
        checkInvalid("n\r\n", key);
        checkInvalid("ne\r\n", key);
View Full Code Here

        checkInvalid("nwe\r\n", key);
    }

    @Test
    public void testShouldParseOld() throws Exception {
        SearchKey key = SearchKey.buildOld();
        checkValid("OLD\r\n", key);
        checkValid("old\r\n", key);
        checkValid("oLd\r\n", key);
        checkInvalid("o\r\n", key);
        checkInvalid("ol\r\n", key);
View Full Code Here

        checkInvalid("olr\r\n", key);
    }

    @Test
    public void testShouldParseFlagged() throws Exception {
        SearchKey key = SearchKey.buildFlagged();
        checkValid("FLAGGED\r\n", key);
        checkValid("flagged\r\n", key);
        checkValid("FLAGged\r\n", key);
        checkInvalid("F\r\n", key);
        checkInvalid("FL\r\n", key);
View Full Code Here

        checkInvalid("FLoas\r\n", key);
    }

    @Test
    public void testShouldParseSmaller() throws Exception {
        SearchKey key = SearchKey.buildSmaller(1729);
        checkValid("SMALLER 1729\r\n", key);
        checkValid("smaller 1729\r\n", key);
        checkValid("SMaller 1729\r\n", key);
        checkInvalid("s\r\n", key);
        checkInvalid("sm\r\n", key);
View Full Code Here

        checkInvalid("smaller peach\r\n", key);
    }

    @Test
    public void testShouldParseLarger() throws Exception {
        SearchKey key = SearchKey.buildLarger(1234);
        checkValid("LARGER 1234\r\n", key);
        checkValid("lArGEr 1234\r\n", key);
        checkValid("larger 1234\r\n", key);
        checkInvalid("l\r\n", key);
        checkInvalid("la\r\n", key);
View Full Code Here

    }

    @Test
    public void testShouldParseUid() throws Exception {
        IdRange[] range = { new IdRange(1) };
        SearchKey key = SearchKey.buildUidSet(range);
        checkValid("UID 1\r\n", key);
        checkValid("Uid 1\r\n", key);
        checkValid("uid 1\r\n", key);
        checkInvalid("u\r\n", key);
        checkInvalid("ui\r\n", key);
View Full Code Here

        checkInvalid("uid \r\n", key);
    }

    @Test
    public void testShouldParseNot() throws Exception {
        SearchKey notdKey = SearchKey.buildSeen();
        SearchKey key = SearchKey.buildNot(notdKey);
        checkValid("NOT SEEN\r\n", key);
        checkValid("Not seen\r\n", key);
        checkValid("not Seen\r\n", key);
        checkInvalid("n\r\n", key);
        checkInvalid("no\r\n", key);
View Full Code Here

TOP

Related Classes of org.apache.james.imap.api.message.request.SearchKey

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.