use of org.apache.tapestry5.runtime.RenderCommand in project tapestry-5 by apache.
the class ExpansionPageElementImplTest method variant_binding_is_not_cached.
@Test
public void variant_binding_is_not_cached() {
Binding binding = mockBinding();
TypeCoercer coercer = mockTypeCoercer();
MarkupWriter writer = mockMarkupWriter();
RenderQueue queue = mockRenderQueue();
Object value = new Object();
train_isInvariant(binding, false);
replay();
RenderCommand element = new ExpansionPageElement(binding, coercer);
verify();
train_get(binding, value);
train_coerce(coercer, value, String.class, "STRING-VALUE");
writer.write("STRING-VALUE");
replay();
element.render(writer, queue);
verify();
train_get(binding, value);
train_coerce(coercer, value, String.class, "STRING-VALUE2");
writer.write("STRING-VALUE2");
replay();
element.render(writer, queue);
verify();
}
Aggregations