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

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


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

    @Test
    public void testShouldParseUnKeyword() throws Exception {
        SearchKey key = SearchKey.buildUnkeyword("AFlag");
        checkValid("UNKEYWORD AFlag\r\n", key);
        checkInvalid("UNKEYWORD \"AFlag\"\r\n", key);
        checkValid("unkeyword AFlag\r\n", key);
        checkInvalid("unkeyword \"AFlag\"\r\n", key);
        checkValid("UnKEYword AFlag\r\n", key);
View Full Code Here


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

    @Test
    public void testShouldParseHeader() throws Exception {
        SearchKey key = SearchKey.buildHeader("Field", "Value");
        checkValid("HEADER Field Value\r\n", key);
        checkValid("HEADER \"Field\" \"Value\"\r\n", key);
        checkValid("header Field Value\r\n", key);
        checkValid("header \"Field\" \"Value\"\r\n", key);
        checkValid("HEAder Field Value\r\n", key);
View Full Code Here

        assertEquals(key, parser.searchKey(null, reader, null, false));
    }

    @Test
    public void testShouldParseDeleted() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkValid("DELETED\r\n", key);
        checkValid("deleted\r\n", key);
        checkValid("deLEteD\r\n", key);
        checkInvalid("d\r\n", key);
        checkInvalid("de\r\n", key);
View Full Code Here

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

    @Test
    public void testEShouldBeInvalid() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkInvalid("e\r\n", key);
        checkInvalid("ee\r\n", key);
    }
View Full Code Here

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

    @Test
    public void testGShouldBeInvalid() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkInvalid("g\r\n", key);
        checkInvalid("G\r\n", key);
    }
View Full Code Here

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

    @Test
    public void testIShouldBeInvalid() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkInvalid("i\r\n", key);
        checkInvalid("I\r\n", key);
    }
View Full Code Here

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

    @Test
    public void testJShouldBeInvalid() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkInvalid("j\r\n", key);
        checkInvalid("J\r\n", key);
    }
View Full Code Here

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

    @Test
    public void testMShouldBeInvalid() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkInvalid("m\r\n", key);
        checkInvalid("M\r\n", key);
    }
View Full Code Here

        checkInvalid("M\r\n", key);
    }
   
    @Test
    public void testPShouldBeInvalid() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkInvalid("p\r\n", key);
        checkInvalid("Pp\r\n", key);
    }
View Full Code Here

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

    @Test
    public void testQShouldBeInvalid() throws Exception {
        SearchKey key = SearchKey.buildDeleted();
        checkInvalid("q\r\n", key);
        checkInvalid("Qq\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.