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

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


        assert_TextHtml_complex("velocity");
    }

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

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


        assert_TextHtml_complex("freemarker");
    }

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

        try {
            getMessageAsText();
View Full Code Here

        }
    }

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

        assert_TextHtml_streamOnlyResource();
    }
View Full Code Here

        assert_TextHtml_streamOnlyResource();
    }

    @Test
    public void complexHtml_dup_fileNames() throws Exception {
        initContent(new HTMLTemplateContent("mail/dup_fileNames.vm"), true, true);
        content.setResourceLoader(factory);
        content.addInlineResource("image1", "/");
        content.addInlineResource("image2", "/mailres");

        String eml = getMessageAsText();
View Full Code Here

        assertEquals(3, StringUtil.countMatches(eml, "Content-Type:"));
    }

    @Override
    protected HTMLTemplateContent createContent() {
        return new HTMLTemplateContent();
    }
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

TOP

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

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.