Re: Unit Testing Actions with Annotation based validation in Struts 2.1.6

2009-10-22 Thread bloodredsun
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-

Re: Unit Testing Actions with Annotation based validation in Struts 2.1.6

2009-10-13 Thread bloodredsun
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

Re: Unit Testing Actions with Annotation based validation in Struts 2.1.6

2009-10-09 Thread bloodredsun
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