TEST DRIVEN DEVELOPMENT

core j2ee patterns describes a controller as a component that interacts with a client,controlling and managing the handling of each request. and tells us that it is used in both presentation-tier and business-tier patterns. in general, a controller does the following: accepts requests;performs any common computations on the request;select an appropriate request handler;routes the request so that the hanlder can execute the relevant business logic; may provide a top-level hanlder for errors and exceptions. a controller is a handy class and can be found in a variety of applications.
stubs are a mechanism for faking the behavior of real code that may exist or that may not have been  wrritten yet. stubs allow you to test a portion of a system without the other part being avaiable. they usually do not change the code you are testing ,but instead adapt to provide seamless integration.

你可能感兴趣的:(TEST DRIVEN DEVELOPMENT)