Package org.apache.jsieve.mail

Examples of org.apache.jsieve.mail.ActionReject


     * between the command and the content.
     */
    public void testRejectMultilineMessageWithDotsMidline() throws Exception {
        String message = "This is not.....a love song";
        String script = "reject text:\r\n" + message + "\r\n.\r\n;";
        ActionReject rejection = runRejectScript(script);       
        assertEquals(message, rejection.getMessage());
    }   
View Full Code Here


     */
    public void testRejectMultilineMessageWithDotStuffing() throws Exception {
        String lineOne = "This is not\n";
        String lineTwo = ".A Love Story";
        String script = "reject text:\r\n" + lineOne + '.' + lineTwo + "\r\n.\r\n;";
        ActionReject rejection = runRejectScript(script);       
        assertEquals(lineOne + lineTwo, rejection.getMessage());
    }
View Full Code Here

     */
    public void testRejectMultilineMessageWithMissedDotStuffing() throws Exception {
        String lineOne = "This is not\n";
        String lineTwo = ".A Love Story";
        String script = "reject text:\r\n" + lineOne + lineTwo + "\r\n.\r\n;";
        ActionReject rejection = runRejectScript(script);       
        assertEquals(lineOne + lineTwo, rejection.getMessage());
    }
View Full Code Here

    public void testNumberOfStuffedDotsInMultilineMessage() throws Exception {
        String lineOne = "This is line 1.\n";
        String lineTwo = "This is line 2.\n";
        String lineThree = "........ This is line 3.\n";
        String script = "reject text:\r\n" + lineOne + lineTwo + '.' + lineThree + "\r\n.\r\n;";
        ActionReject rejection = runRejectScript(script);       
        assertEquals(lineOne + lineTwo + lineThree, rejection.getMessage());
    }
View Full Code Here

        String lineTwo = "This is line 2.\n";
        String lineThree = "........ This is line 3.\n";
        String lineFour = ".\n";
        String lineFive = ".\n";
        String script = "reject text:\r\n" + lineOne + lineTwo + '.' + lineThree + '.' + lineFour + '.' + lineFive + "\r\n.\r\n;";
        ActionReject rejection = runRejectScript(script);       
        assertEquals(lineOne + lineTwo + lineThree + lineFour + lineFive, rejection.getMessage());
    }
View Full Code Here

        MailAdapter mail = JUnitUtils.createMail();
        JUnitUtils.interpret(mail, script);
        assertTrue(mail.getActions().size() == 1);
        Object action = mail.getActions().get(0);
        assertTrue(action instanceof ActionReject);
        ActionReject rejection = (ActionReject) action;
        return rejection;
    }
View Full Code Here

TOP

Related Classes of org.apache.jsieve.mail.ActionReject

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.