Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. Elementary tests > Test a JavaBean

2.7. Test a JavaBean

Problem

You want to test a JavaBean, but the tests you write seem to be both repetitive and brittle.

Background

Because a JavaBean is little more than a collection of get and set methods, the tests that you write for your bean look like nothing more than a repetition of the code under test. This is decidedly not satisfying. If you feel this way about testing JavaBeans, then you’re not alone.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint