Unable to Mock behavior using Mockito for testing Struts2 action class method

2015-04-13 Thread swathi yakkali
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: @Moc

Struts 2 manually call a custom validation in an action

2015-04-13 Thread Alireza Fattahi
We have used struts 2 validation with lots of custom validation to validate our forms.     @Validations(     customValidators =     { @CustomValidator(type = "AccountFormat", fieldName = "accountNo") }     ) Also we can can manually validate a form by overriding the valid