Package com.alibaba.citrus.service.mail.builder.content

Examples of com.alibaba.citrus.service.mail.builder.content.TextTemplateContent


        plainText.setId("plainText");

        TextContent htmlText = new TextContent("<���������д�>", "text/html");
        htmlText.setId("htmlText");

        TextTemplateContent plainTextTemplate = new TextTemplateContent("mail/mytemplate.vm", "text/plain");
        plainTextTemplate.setId("plainTextTemplate");

        AttachmentContent textAttachment = new AttachmentContent("testfile.txt");
        textAttachment.setId("textAttachment");

        HTMLTemplateContent htmlTemplate = new HTMLTemplateContent("mail/complexhtml.vm");
        htmlTemplate.setId("htmlTemplate");

        plainTextTemplate.setTemplateService(templateService);
        plainTextTemplate.setPullService(pullService);

        htmlTemplate.setTemplateService(templateService);
        htmlTemplate.setPullService(pullService);
        htmlTemplate.setResourceLoader(factory);
        htmlTemplate.addInlineResource("image", "/");
View Full Code Here


        assertEquals(result, content.toString());
    }

    @Test
    public void mytemplate_vm() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.vm"), true, false);
        assert_TextPlain_mytemplate_noPullTools("velocity");
    }
View Full Code Here

        assert_TextPlain_mytemplate_noPullTools("velocity");
    }

    @Test
    public void mytemplate_ftl() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.ftl"), true, false);
        assert_TextPlain_mytemplate_noPullTools("freemarker");
    }
View Full Code Here

        assert_TextPlain_mytemplate_noPullTools("freemarker");
    }

    @Test
    public void mytemplate_vm_contentType() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.vm", "text/html"), true, false);
        assert_TextHtml_mytemplate_noPullTools("velocity");
    }
View Full Code Here

        assert_TextHtml_mytemplate_noPullTools("velocity");
    }

    @Test
    public void mytemplate_ftl_contentType() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.ftl", "text/html"), true, false);
        assert_TextHtml_mytemplate_noPullTools("freemarker");
    }
View Full Code Here

        assert_TextHtml_mytemplate_noPullTools("freemarker");
    }

    @Test
    public void mytemplate_vm_pull() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.vm"), true, true);
        builder.setAttribute("hello", "world");
        assert_TextPlain_mytemplate_pullTools_and_vars("velocity");
    }
View Full Code Here

        assert_TextPlain_mytemplate_pullTools_and_vars("velocity");
    }

    @Test
    public void mytemplate_ftl_pull() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.ftl"), true, true);
        builder.setAttribute("hello", "world");
        assert_TextPlain_mytemplate_pullTools_and_vars("freemarker");
    }
View Full Code Here

        assertThat(eml, containsRegex(extra + REGEX_EOL));
    }

    @Override
    protected TextTemplateContent createContent() {
        return new TextTemplateContent();
    }
View Full Code Here

        assertEquals(result, content.toString());
    }

    @Test
    public void mytemplate_vm() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.vm"), true, false);
        assert_TextPlain_mytemplate_noPullTools("velocity");
    }
View Full Code Here

        assert_TextPlain_mytemplate_noPullTools("velocity");
    }

    @Test
    public void mytemplate_ftl() throws Exception {
        initContent(new TextTemplateContent("mail/mytemplate.ftl"), true, false);
        assert_TextPlain_mytemplate_noPullTools("freemarker");
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.service.mail.builder.content.TextTemplateContent

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.