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

Examples of org.apache.james.imap.api.message.response.StatusResponse$ResponseCode


        assertNull(response.getCommand());
    }

    @Test
    public void testUntaggedBad() {
        StatusResponse response = factory.untaggedBad(KEY);
        assertNotNull(response);
        assertEquals(StatusResponse.Type.BAD, response.getServerResponseType());
        assertEquals(null, response.getTag());
        assertEquals(KEY, response.getTextKey());
        assertNull(response.getResponseCode());
        assertNull(response.getCommand());
        response = factory.untaggedBad(KEY, CODE);
        assertNotNull(response);
        assertEquals(StatusResponse.Type.BAD, response.getServerResponseType());
        assertEquals(null, response.getTag());
        assertEquals(KEY, response.getTextKey());
        assertEquals(CODE, response.getResponseCode());
        assertNull(response.getCommand());
    }
View Full Code Here


        assertNull(response.getCommand());
    }

    @Test
    public void testPreauth() {
        StatusResponse response = factory.preauth(KEY);
        assertNotNull(response);
        assertEquals(StatusResponse.Type.PREAUTH, response
                .getServerResponseType());
        assertEquals(null, response.getTag());
        assertEquals(KEY, response.getTextKey());
        assertNull(response.getResponseCode());
        assertNull(response.getCommand());
        response = factory.preauth(KEY, CODE);
        assertNotNull(response);
        assertEquals(StatusResponse.Type.PREAUTH, response
                .getServerResponseType());
        assertEquals(null, response.getTag());
        assertEquals(KEY, response.getTextKey());
        assertEquals(CODE, response.getResponseCode());
        assertNull(response.getCommand());
    }
View Full Code Here

        super(next);
        this.localizer = localizer;
    }

    protected void doEncode(ImapMessage acceptableMessage, ImapResponseComposer composer, ImapSession session) throws IOException {
        StatusResponse response = (StatusResponse) acceptableMessage;
        final Type serverResponseType = response.getServerResponseType();
        final String type = asString(serverResponseType);
        final ResponseCode responseCode = response.getResponseCode();
        final String code = asString(responseCode);
        final String tag = response.getTag();
        final ImapCommand command = response.getCommand();
        final HumanReadableText textKey = response.getTextKey();
        final String text = asString(textKey, session);
        final Collection<String> parameters;
        final long number;
        final boolean useParens;
        if (responseCode == null) {
View Full Code Here

        assertNull(response.getCommand());
    }

    @Test
    public void testBye() {
        StatusResponse response = factory.bye(KEY);
        assertNotNull(response);
        assertEquals(StatusResponse.Type.BYE, response.getServerResponseType());
        assertEquals(null, response.getTag());
        assertEquals(KEY, response.getTextKey());
        assertNull(response.getResponseCode());
        assertNull(response.getCommand());
        response = factory.bye(KEY, CODE);
        assertNotNull(response);
        assertEquals(StatusResponse.Type.BYE, response.getServerResponseType());
        assertEquals(null, response.getTag());
        assertEquals(KEY, response.getTextKey());
        assertEquals(CODE, response.getResponseCode());
        assertNull(response.getCommand());
    }
View Full Code Here

TOP

Related Classes of org.apache.james.imap.api.message.response.StatusResponse$ResponseCode

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.