Summary


Cactus allows developers to write in-container tests for J2EE components. In this chapter, we covered testing two of these components , servlets and filters, respectively. Both ServletTestCase and FilterTestCase provide a set of implicit objects, such as request, response, and config, which can be used to simulate the context of a container in our tests. Again, most of the principles that apply to writing a ServletTestCase apply to the other types of Cactus TestCase. For details on JspTestCase, check out the next two chapters on testing JSPs and custom tags.




Professional Java Tools for Extreme Programming
Professional Java Tools for Extreme Programming: Ant, XDoclet, JUnit, Cactus, and Maven (Programmer to Programmer)
ISBN: 0764556177
EAN: 2147483647
Year: 2003
Pages: 228

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net