Java Mailing List Archive

http://www.gg3721.com/

Home » user.jmock »

[jmock-user] Parameter Matching with annoymous class

william1104

2008-04-23

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi all,

I would like to a class like that

class A {
private B b;

public A(B b){
  this.b = b;
  this.b.addListener(new C(){
   // ...
  };
}
}

I would like to test the construction of class A with and mock object B. To
do so, I have to set the expectation for method "b.addListener(with(...))".
If you have some ideas on what the "..." should be, please kindly let me
know. Thanks to anyone can help.

Regards,
William

--
Sent from the jMock - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.