use of com.google.template.soy.data.SoyDict in project closure-templates by google.
the class RenderVisitorTest method testRenderSelectWithRuntimeErrors.
@Test
public void testRenderSelectWithRuntimeErrors() throws Exception {
String templateBody = "{@param gender: ?}\n" + "{@param person: ?}\n" + " {msg desc=\"Simple select message\"}\n" + " {select $gender}\n" + " {case 'female'}{$person} shared her photos.\n" + " {default}{$person} shared his photos.\n" + " {/select}\n" + " {/msg}\n";
SoyDict data = SoyValueConverterUtility.newDict("person", "The president", "gender", 100);
assertRenderExceptionWithData(templateBody, data, "Select expression \"$gender\" doesn't evaluate to string.");
}
Aggregations