I am trying to use spring-mvc-test framework to test my controller (name it MainController).
MainController has injected one service (OuterService) witch i want to mock in standolone test...
Type: Posts; User: damian0o; Keyword(s):
I am trying to use spring-mvc-test framework to test my controller (name it MainController).
MainController has injected one service (OuterService) witch i want to mock in standolone test...
Thank You very much for your reply.
Above solution is looking great but how to populate binding result object because constructor alone only set fields in BeanPropertyBindingResult. (It seems that...
I would like not to use mocked binding result object because MyClass has many inner fields whose should be validated and my flow depends on validation result. (Some not filled will rise an exception...
I am testing my controllers using
AnnotationMethodHandlerAdapter
One of my controller method looks like:
@RequestMapping(value = "/")
public String start(@Validated MyType myType,...
I recently open two related questions on stackoverflow by i didn't get an answer. Could anyone help my on this?
How magic works and Using converters in junit tests
Thanks in adwance!