Package net.sf.jelly.apt.freemarker

Examples of net.sf.jelly.apt.freemarker.APTJellyObjectWrapper.wrap()


*/
public class TestFreemarkerWrapping extends TestCase {

  public void testWrapEnums() throws Exception {
    APTJellyObjectWrapper wrapper = new APTJellyObjectWrapper();
    TemplateModel wrapped = wrapper.wrap(KnownXmlType.STRING);
    assertTrue(wrapped instanceof TemplateHashModel);
    TemplateHashModel hash = ((TemplateHashModel) wrapped);
    assertNotNull(hash.get("anonymous"));

    wrapped = wrapper.wrap(ContentType.COMPLEX);
View Full Code Here


    TemplateModel wrapped = wrapper.wrap(KnownXmlType.STRING);
    assertTrue(wrapped instanceof TemplateHashModel);
    TemplateHashModel hash = ((TemplateHashModel) wrapped);
    assertNotNull(hash.get("anonymous"));

    wrapped = wrapper.wrap(ContentType.COMPLEX);
    assertTrue(wrapped instanceof TemplateHashModel);
    hash = ((TemplateHashModel) wrapped);
    TemplateModel complex = hash.get("complex");
    assertNotNull(complex);
    assertTrue(complex instanceof TemplateBooleanModel);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.