|
|
|
@ -140,6 +140,7 @@ public class FreeMarkerMacroTests extends TestCase {
@@ -140,6 +140,7 @@ public class FreeMarkerMacroTests extends TestCase {
|
|
|
|
|
|
|
|
|
|
TestBean tb = new TestBean("Darren", 99); |
|
|
|
|
tb.setSpouse(new TestBean("Fred")); |
|
|
|
|
tb.setJedi(true); |
|
|
|
|
request.setAttribute("command", tb); |
|
|
|
|
|
|
|
|
|
HashMap names = new HashMap(); |
|
|
|
@ -192,6 +193,10 @@ public class FreeMarkerMacroTests extends TestCase {
@@ -192,6 +193,10 @@ public class FreeMarkerMacroTests extends TestCase {
|
|
|
|
|
if (tokens[i].equals("FORM11")) assertEquals("<input type=\"text\" id=\"name\" name=\"name\" value=\"Darren\" >", tokens[i + 1]); |
|
|
|
|
if (tokens[i].equals("FORM12")) assertEquals("<input type=\"hidden\" id=\"name\" name=\"name\" value=\"Darren\" >", tokens[i + 1]); |
|
|
|
|
if (tokens[i].equals("FORM13")) assertEquals("<input type=\"password\" id=\"name\" name=\"name\" value=\"\" >", tokens[i + 1]); |
|
|
|
|
if (tokens[i].equals("FORM15")) assertEquals("<input type=\"hidden\" name=\"_name\" value=\"on\"/>", tokens[i + 1]); |
|
|
|
|
if (tokens[i].equals("FORM15")) assertEquals("<input type=\"checkbox\" id=\"name\" name=\"name\" checked=\"false\" />", tokens[i + 2]); |
|
|
|
|
if (tokens[i].equals("FORM16")) assertEquals("<input type=\"hidden\" name=\"_jedi\" value=\"on\"/>", tokens[i + 1]); |
|
|
|
|
if (tokens[i].equals("FORM16")) assertEquals("<input type=\"checkbox\" id=\"jedi\" name=\"jedi\" checked=\"true\" />", tokens[i + 2]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|