And as promised here it is
http://bloodredsun.blog.com/2009/10/21/unit-testing-struts2-actions-with-annotation-based-validation/
http://bloodredsun.blog.com/2009/10/21/unit-testing-struts2-actions-with-annotation-based-validation/
--
View this message in context:
http://www.nabble.com/Unit-
I've figured how to do it!
You need to use the container properly to populate all the fields with
@Inject annotated setters. It's another reason why I don't like auto-wiring.
I know it's powerful and when you're familiar with the codebase it's simple
but it makes stepping through the code a night
Well I've managed to create something that tests annotation based validations
but it isn't pretty! This does not work for ModelDriven actions as it falls
over with the VisitorFieldValidator not having a config.
Here's an example. First we have the Action to test and then the Unit Test
with all th
3 matches
Mail list logo