A solution has been found by mbosteels.dns.

When I did my tests, I discovered that lot of Wicket classes weren't
implementing the equals() method, but ResourceReference do implement it.  If
I set my Image using a ResourceReference, I can create an assertEquals
statement in my JUnit test and compare the
image.getDefaultModel().getObject() with an instance of ResourceReference I
create in my test with the expected value.
Have a good day
On Thu, Nov 27, 2008 at 9:32 AM, Nicolas Castin <[EMAIL PROTECTED]>wrote:

> Hello,
>
> I am writing a JUnit test for a Wicket page containing some images added
> dynamically.  My test needs to detect which images as been rendered, but the
> org.apache.wicket.markup.html.image.Image class doesn't expose any method to
> get it's resource.
>
> I can extend the class to have a public method giving me the resource, but
> I can't imagine that there aren't another way to do this.
>
> Thanks for your help.
>
> Nicolas Castin
> Senior Software Developer
> EURid.eu
>
>


-- 
Nicolas Castin
Senior Software Developer
EURid.eu

Reply via email to