Java Reference
In-Depth Information
2.5
Summary
In this chapter, we introduced the core JU nit concepts and classes. We showed you
how to fuse a test class, a Suite , and a Runner .
Use a test class to test one domain object where each test method focuses on one
domain method or a specific set of methods. JU nit 4 makes extensive uses of annota-
tions to define and manage tests. JU nit 4 has made obsolete the JU nit 3 requirement
of making a test class a TestCase subclass.
You use a test suite to group related test classes together, allowing you to invoke
them as a group. You can even group suites together in higher-level suites.
You use a Runner to invoke unit tests and test suites.
In the next chapter, we introduce the Controller design pattern and build a sam-
ple Controller component application that we test with JU nit. This way, we not only
show you how to use the JU nit components we've been discussing so far, but we also
introduce many JU nit best practices.
 
Search WWH ::




Custom Search