Search in sources :

Example 16 with RenderQueue

use of org.apache.tapestry5.runtime.RenderQueue 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();
}
Also used : Binding(org.apache.tapestry5.Binding) RenderCommand(org.apache.tapestry5.runtime.RenderCommand) TypeCoercer(org.apache.tapestry5.commons.services.TypeCoercer) RenderQueue(org.apache.tapestry5.runtime.RenderQueue) MarkupWriter(org.apache.tapestry5.MarkupWriter) Test(org.testng.annotations.Test)

Aggregations

MarkupWriter (org.apache.tapestry5.MarkupWriter)14 RenderQueue (org.apache.tapestry5.runtime.RenderQueue)14 RenderCommand (org.apache.tapestry5.runtime.RenderCommand)13 Test (org.testng.annotations.Test)9 TypeCoercer (org.apache.tapestry5.commons.services.TypeCoercer)3 Binding (org.apache.tapestry5.Binding)2 Block (org.apache.tapestry5.Block)2 ComponentResources (org.apache.tapestry5.ComponentResources)2 Renderable (org.apache.tapestry5.Renderable)2 TapestryException (org.apache.tapestry5.commons.internal.util.TapestryException)2 Element (org.apache.tapestry5.dom.Element)2 Logger (org.slf4j.Logger)2 AccessControlException (java.security.AccessControlException)1 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 Collection (java.util.Collection)1 Date (java.util.Date)1 List (java.util.List)1 Map (java.util.Map)1