struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swathi yakkali <>
Subject Unable to Mock behavior using Mockito for testing Struts2 action class method
Date Mon, 13 Apr 2015 12:12:12 GMT

I am writing a test case extending from strutsspringtestcase and invoking
the actions as below:

ActionProxy proxy = getActionProxy("/login");
LoginAction action = (LoginAction) proxy.getAction();
String result = proxy.execute();

Also, I am creating mocked objects using mockito as below:
DepenencyClass mockedObject;

 public void setUp() throws Exception{

My expectation is that the action should hit mocked method instead of the
original method. I do understand there is certainly a gap in my
understanding but any help shall be appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message