My thoughts are that @Parameter annotation represents an integration between the component and its immediate container or other part of the system. @Parameter(required=true) failures will show up in integration tests.
In the rare event that I unit test an individual component, I just use the facilities of TestBase to push values into private fields. Most of my testing is done at the integration level (PageTester or Selenium). On Wed, Dec 30, 2009 at 11:53 AM, Stephan Schwab <s...@caimito.net> wrote: > > Is there any recommended way of unit testing components that have @Parameter > annotations? > > Of course I can add a setter to provide the parameter in my test but that > kind of defeats the purpose of @Parameter(required=true). I can call the > setter or not do it. If I don't call the setter, the test should fail. > > Thanks for your thoughts. > > Stephan > > > ----- > -- > http://www.caimito.net - Caimito One Team - Agile Collaboration and Planning > tool > http://www.stephan-schwab.com - Personal blog > http://code.google.com/p/tapestry-sesame - Authentication extension for > Tapestry 5 > > -- > View this message in context: > http://old.nabble.com/Unit-testing-components-with-%40Parameter-annotation-tp26971514p26971514.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org