Examples of ListResponse


Examples of org.apache.james.imap.message.response.ListResponse

        assertFalse(encoder.isAcceptable(null));
    }

    @Test
  public void testName() throws Exception {    
        encoder.encode(new ListResponse(false, false, false, false, false, false, "INBOX.name", '.'), composer, new FakeImapSession());
        assertEquals("* LIST () \".\" \"INBOX.name\"\r\n", writer.getString());
    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

        assertEquals("* LIST () \".\" \"INBOX.name\"\r\n", writer.getString());
    }

    @Test
  public void testDelimiter() throws Exception {
        encoder.encode(new ListResponse(false, false, false, false, false, false, "INBOX.name", '.'), composer, new FakeImapSession());
        assertEquals("* LIST () \".\" \"INBOX.name\"\r\n", writer.getString());
    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

    }


    @Test
    public void testAllAttributes() throws Exception {
        encoder.encode(new ListResponse(true, true, true, true, false, false, "INBOX.name", '.'), composer, new FakeImapSession());
        assertEquals("* LIST (\\Noinferiors \\Noselect \\Marked \\Unmarked) \".\" \"INBOX.name\"\r\n", writer.getString());

    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

    }

    @Test
    public void testNoInferiors() throws Exception {     
        encoder.encode(new ListResponse(true, false, false, false, false, false, "INBOX.name", '.'), composer, new FakeImapSession());
        assertEquals("* LIST (\\Noinferiors) \".\" \"INBOX.name\"\r\n", writer.getString());
    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

        assertEquals("* LIST (\\Noinferiors) \".\" \"INBOX.name\"\r\n", writer.getString());
    }

    @Test
    public void testNoSelect() throws Exception {
        encoder.encode(new ListResponse(false, true, false, false, false, false, "INBOX.name", '.'), composer, new FakeImapSession());
        assertEquals("* LIST (\\Noselect) \".\" \"INBOX.name\"\r\n", writer.getString());

    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

    }

    @Test
    public void testMarked() throws Exception {
        encoder.encode(new ListResponse(false, false, true, false, false, false, "INBOX.name", '.'), composer, new FakeImapSession());
        assertEquals("* LIST (\\Marked) \".\" \"INBOX.name\"\r\n", writer.getString());

    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

    }

    @Test
    public void testUnmarked() throws Exception {
        encoder.encode(new ListResponse(false, false, false, true, false, false, "INBOX.name", '.'), composer, new FakeImapSession());
        assertEquals("* LIST (\\Unmarked) \".\" \"INBOX.name\"\r\n", writer.getString());

    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

    @Test
    public void testShouldAddHasChildrenToAttributes() throws Exception {
        // Setup
        attributesOutput.add("\\HasChildren");
        ListResponse input = new ListResponse(false, false, false, false, true, false, nameParameter, '.');
           
        // Exercise
        ListingEncodingUtils.encodeListingResponse(typeNameParameters, composer, input);
        Assert.assertEquals("* A Type Name (\\HasChildren) \".\" \"LIST\"\r\n", writer.getString());
    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

   
    @Test
    public void testShouldAddHasNoChildrenToAttributes() throws Exception {
        // Setup
        attributesOutput.add("\\HasNoChildren");
        ListResponse input = new ListResponse(false, false, false, false, false, true, nameParameter, '.');
           
        // Exercise
        ListingEncodingUtils.encodeListingResponse(typeNameParameters, composer, input);
        Assert.assertEquals("* A Type Name (\\HasNoChildren) \".\" \"LIST\"\r\n", writer.getString());

View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

        encoder = new LSubResponseEncoder(mockNextEncoder);
    }

    @Test
    public void testIsAcceptable() {
        assertFalse(encoder.isAcceptable(new ListResponse(true, true, true,
                true, false, false, "name", '.')));
        assertTrue(encoder.isAcceptable(new LSubResponse("name", true, '.')));
        assertFalse(encoder.isAcceptable(context.mock(ImapMessage.class)));
        assertFalse(encoder.isAcceptable(null));
    }
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.