atom feed7 messages in org.codehaus.jmock.userRe: [jmock-user] verify properties of...
FromSent OnAttachments
Eugeny N DzhurinskyNov 2, 2007 4:08 am 
Nat PryceNov 2, 2007 5:56 am 
Dale KingNov 2, 2007 6:08 am 
Eugene DzhurinskyNov 2, 2007 6:12 am 
Dale KingNov 2, 2007 6:17 am 
Eugene DzhurinskyNov 2, 2007 6:28 am 
Dale KingNov 2, 2007 6:31 am 
Subject:Re: [jmock-user] verify properties of argument objects passed to methods of a mocked interface
From:Nat Pryce (nat.@gmail.com)
Date:Nov 2, 2007 5:56:24 am
List:org.codehaus.jmock.user

Have a look at the documentation for parameter matchers:

http://www.jmock.org/matchers.html

and

http://www.jmock.org/custom-matchers.html

Also look at the Javadoc for org.hamcrest.Matchers.

--Nat

On 02/11/2007, Eugeny N Dzhurinsky <bo@redwerk.com> wrote:

Hello!

I would like to test the implementation of my custom TableModel (Swing). In this model it is possible to fire events when something was changed in the table. At this point TableModelListener interface is used, in particular - it's method tableChanged which accepts TableModelEvent.

I am creating the mock for the TableModelListener and register it in TableModel, then I would like to test if the argument of the method tableChanged has certain property set to certain value.

Could somebody please explain or point me to documentation where I could find such trick described?

Thank you in advance!