Thanks for you advice. I think I'm a bit further forward.
viewProductDetail is actually a Tapestry component and is instantiated
using the com.javaforge.tapestry.testng.TestBase; library.
I have removed the expect call from my testGetSaving method and moved
the replay/verify to my setUp metho
Hmm .I can't pinpoint the exact problem but if it were up to me I would
start out by changing things to look more like:
public void setUp() {
...
webRequest = createMock(WebRequest.class);
expect(webRequest.getSession(true)).andReturn(webSession);
...
}
public void testGetSaving
Hi,
Thanks for you quick reply.
Sorry, my fault, I must have deleted these while removing my sysouts for
this post.
I have tried using these but unfortunately receive the same exception. I
have also done several searches on google, which seems to suggest the
exception is caused by the omiss
You still need to call the replay() / verify() easymock methods, which can
be examined further here:
http://easymock.org/EasyMock2_2_Documentation.html
I think getSession(boolean) also returns a value - so you'd have to define
what that return value is with a statement like:
expect(webRequest.g