Hi,

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:
@Mock
DepenencyClass mockedObject;

@Before
 public void setUp() throws Exception{
 super.setUp();
 when(mockedObject.Method1()).thenReturn(result);
}

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.

Thanks!!

Reply via email to