Hi,

I'm trying to use TapestryTestCase, here is a simple case that I don't know
how to handle:

here is the object under test:

public class MyServiceImpl implements MyService {

    final private Session session;
    public MyServiceImpl(Session session) {
        this.session = session;
    }

    public void appendUsr() {
        Usr usr = new Usr();
        session.save(usr);
    }
}

and here is the test code:

public class MyServiceImplTest extends TapestryTestCase {

    @Test
    public void test() {
        Session session = newMock(Session.class);
        MyServiceImpl service = new MyServiceImpl(session);

        expect(session.save(new Usr())).andReturn(null); // is this correct
way to specify expectation?

        replay();
        service.appendUsr();
        verify();
    }
}

I always get :

Unexpected method call Session.save...

Any idea what's wrong here? Thanks,

A.C.



-- 
View this message in context: 
http://www.nabble.com/T5%3A-TapestryTestCase-newbie-tp14990341p14990341.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]

Reply via email to