@@ -0,0 +1,2396 @@
+package com.wizzardo.http.template;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * @author: moxa%0A * Date: 2/11/13%0A */%0Apublic class RenderTest %7B%0A    @Test%0A    public void render() %7B%0A%0A    %7D%0A%0A    @Test%0A    public void prepare() %7B%0A        String s;%0A        StringBuilder sb = new StringBuilder();%0A        RenderableList l = new RenderableList();%0A        Map%3CString, Object%3E model = new HashMap%3CString, Object%3E();%0A%0A        reset(sb, l, model);%0A        s = %22abc%22;%0A        ViewRenderer.prepare(s, sb, l);%0A        Assert.assertEquals(%22abc%22, sb.toString());%0A        Assert.assertEquals(0, l.size());%0A%0A        reset(sb, l, model);%0A        s = %22abc$qwerty%22;%0A        model.put(%22qwerty%22, %22abc%22);%0A        ViewRenderer.prepare(s, sb, l);%0A        Assert.assertEquals(%22%22, sb.toString());%0A        Assert.assertEquals(2, l.size());%0A        Assert.assertEquals(%22abc%22, l.get(0).get(null).toString());%0A        Assert.assertEquals(%22abc%22, l.get(1).get(model).toString());%0A%0A%0A        reset(sb, l, model);%0A        s = %22abc$qwerty-$qwerty%22;%0A        model.put(%22qwerty%22, %22abc%22);%0A        ViewRenderer.prepare(s, sb, l);%0A        Assert.assertEquals(%22%22, sb.toString());%0A        Assert.assertEquals(4, l.size());%0A        Assert.assertEquals(%22abc%22, l.get(0).get(null).toString());%0A        Assert.assertEquals(%22abc%22, l.get(1).get(model).toString());%0A        Assert.assertEquals(%22-%22, l.get(2).get(model).toString());%0A        Assert.assertEquals(%22abc%22, l.get(3).get(model).toString());%0A%0A%0A        reset(sb, l, model);%0A        s = %22abc$%7Bqwerty%7D%22;%0A        model.put(%22qwerty%22, %22abc%22);%0A        ViewRenderer.prepare(s, sb, l);%0A        Assert.assertEquals(%22%22, sb.toString());%0A        Assert.assertEquals(2, l.size());%0A        Assert.assertEquals(%22abc%22, l.get(0).get(null).toString());%0A        Assert.assertEquals(%22abc%22, l.get(1).get(model).toString());%0A%0A%0A        reset(sb, l, model);%0A        s = %22abc$%7Bqwerty+qwerty%7D%22;%0A        model.put(%22qwerty%22, %22abc%22);%0A        ViewRenderer.prepare(s, sb, l);%0A        Assert.assertEquals(%22%22, sb.toString());%0A        Assert.assertEquals(2, l.size());%0A        Assert.assertEquals(%22abc%22, l.get(0).get(null).toString());%0A        Assert.assertEquals(%22abcabc%22, l.get(1).get(model).toString());%0A    %7D%0A%0A    private void reset(StringBuilder sb, List l, Map m) %7B%0A        sb.setLength(0);%0A        l.clear();%0A        m.clear();%0A    %7D%0A%7D%0A

add RenderTest