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

Examples of com.alibaba.citrus.service.mail.builder.content.HTMLTemplateContent$InlineResource


        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", "/");

        textAttachment.setResourceLoader(factory);

        // ����builder
        builder.setContent(attachable);
View Full Code Here


        assertEquals("text/xhtml", content.getContentType());
    }

    @Test
    public void addInlineResource() throws Exception {
        initContent(new HTMLTemplateContent("mail/mytemplate.vm"), true, true);

        // id is null
        try {
            content.addInlineResource(null, null);
            fail();
View Full Code Here

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

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

        assert_TextHtml_mytemplate_noPullTools("velocity");
    }

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

        assert_TextHtml_mytemplate_noPullTools("freemarker");
    }

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

        assert_TextPlain_mytemplate_noPullTools("velocity");
    }

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

        assert_TextPlain_mytemplate_noPullTools("freemarker");
    }

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

        assert_TextHtml_mytemplate_pullTools_and_vars("velocity");
    }

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

        assert_TextHtml_mytemplate_pullTools_and_vars("freemarker");
    }

    @Test
    public void complexHtml_noResourceLoader() throws Exception {
        initContent(new HTMLTemplateContent("mail/complexhtml.vm"), true, true);
        content.addInlineResource("image", "/");

        try {
            getMessageAsText();
            fail();
View Full Code Here

        }
    }

    @Test
    public void complexHtml_vm() throws Exception {
        initContent(new HTMLTemplateContent("mail/complexhtml.vm"), true, true);
        content.setResourceLoader(factory);
        content.addInlineResource("image", "/");

        assert_TextHtml_complex("velocity");
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.service.mail.builder.content.HTMLTemplateContent$InlineResource

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.