JaVa
   

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.


JaVa
   
Comments