Yes. A matcher intended for a bean will not work with a list.
How about you tell us what you're actually trying to test, then we can
help you.
S.
On 5 Jun 2009, at 09:08, Thomas Richter wrote:
> Hi,
>
> This should work:
> one(mocked).method(with(aPropertyValuesAsMatcher(expected)));
>
> @Factory
> public Matcher<Entity> aPropertyValuesAsMatcher(
> final Entity expected) {
> return new SamePropertyValuesAs<Entity>(expected);
> }
>
> but not this:
>
> one(mocked).method(with(aPropertyValuesAsMatcher(expected)));
>
> @Factory
> public Matcher<List<Entity>> aPropertyValuesAsMatcher(
> final List<Entity> expected) {
> return new SamePropertyValuesAs<List<Entity>>(expected);
> }
Steve Freeman
Winner of the Agile Alliance Gordon Pask award 2006
http://www.m3p.co.ukM3P Limited.
Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
Company registered in England & Wales. Number 03689627
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email