Also check AttributeModifierTest in wicket-core/src/test/java/..

On Tue, May 7, 2013 at 5:31 PM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote:

> attribute modifiers are behaviors, so use
> component.getbehavior(AttributeModifier.class) to get it.
>
> -igor
>
> On Tue, May 7, 2013 at 8:24 AM, Dmitriy Neretin
> <dmitriy.nere...@googlemail.com> wrote:
> > Hello,
> >
> > Is it possible to unit test an AttributeModifier?
> >
> > I have a simple component:
> >
> > WebMarkupContainer container = new WebMarkupContainer("containerId");
> > container.add(new AttributeModifier("name", "anyDynamicValue"));
> >
> > In the unit test:
> >
> > WebMarkupContainer container = (WebMarkupContainer)
> > tester.getComponentFromLastRenderedPage("containerId");
> >
> > Is it possible to get the modifier above? I can see it in the object
> state
> > (while debugging) but I have no idea how to get it to test an
> > anyDynamicValue...
> >
> > Any ideas?
> >
> > Regards,
> >
> > Dmitriy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>

Reply via email to