Actually, take a look at some EasyMock tutorials (that's what's behind)
i think their site has a few...

Also, use:

       Mailer mailer = this.newMock(Mailer.class);
       expect(mailer.sendIt()).andReturn("done");
       mailer.send();



On Jan 18, 2008 4:06 AM, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Thanks, that works. one related question:
>
> I have this:
>
> public interface Mailer {
>         public void send();
>     public String sendIt();
> }
>
> then somewhere in the test, i'd like to make sure send is called, but it can
> not passed to expect as the latter expects a object, any way to 'expect' a
> void method? thanks.
>
>         Mailer mailer = this.newMock(Mailer.class);
>         expect(mailer.sendIt()).andReturn("done");  // this works
>         expect(mailer.send()).andReturn(null); // this does not work
>
>
>
> Igor Drobiazko wrote:
> >
> > Mock the session and pass through to the constructor:
> >
> > Session session = newMock(Session.class);
> > Service service = new Service(session);
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-using-TapestryTestCase-tp14913469p14944102.html
>
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to