Sun Java Solaris Communities My SDN Account Join SDN
 
Books & Authors

Java Extreme Programming Cookbook

 
Books Index

by Eric M. Burke and Brian M. Coyner
June, 2003

Chapter 4, JUnit | Chapter 6, Mock Objects

Book Cover

The JDC is pleased to present two chapters from Java Extreme Programming Cookbook by Eric M. Burke and Brian M. Coyner, published by O'Reilly and Associates.

About the Book

Brimming with over 100 "recipes" for getting down to business and actually doing Extreme Programming (XP), the Java Extreme Programming Cookbook doesn't try to "sell" you on XP; it succinctly documents the most important features of popular open source tools for XP in Java programming-- including Ant, Junit, HttpUnit, Cactus, Tomcat, XDoclet-- and then digs right in, providing recipes for implementing the tools in real-world environments.

Each recipe offers solutions that help you put an extreme programming environment together: then provides code for automating the build process and testing. Although the time saved using any one of these solutions will more than pay for the book, Java Extreme Programming Cookbook offers more than just a collection of cut-and-paste code. Each recipe also includes explanations of how and why the approach works, so you can adapt the techniques to similar situations.

About the Chapters

Unit testing is at the heart of XP, and it is a central theme of this book. JUnit, available from http://www.junit.org, is the de facto standard for Java unit testing. Chapter 4, " JUnit " takes you through the simple framework for creating automated unit tests. JUnit test cases are Java classes that contain one or more unit test methods, and these tests are grouped into test suites. You can run tests individually, or you can run entire test suites.

Chapter 6, " Mock Objects " discusses how testing gets a whole lot more interesting for classes with complex dependencies on other parts of your application. It takes you through event listener testing, mock object self-validation, writing and testing JDBC code, generating mock objects w/ MockMaker and much more.

Ordering Information

O'Reilly.com

Amazon.com

SoftPro Computer Books

About the Authors

Eric Burke is an O'Reilly author and a Principal Software Engineer with Object Computing, Inc. in St. Louis, MO. He specializes in Java technology and his job duties include consulting, training, and public speaking engagements. Eric can be reached at burke_e@yahoo.com.

Brian M. Coyner is a Senior Software Engineer with Object Computing, Inc. in St. Louis, MO. He has a B.S. in Computer Science from Southeast Missouri State University, and specializes in Java technology training and consulting. When he is not working, which is rare, Brian enjoys playing the guitar and spending time with his family.

Chapter 4, JUnit | Chapter 6, Mock Objects


Reader Feedback
Excellent   Good   Fair   Poor  

If you have other comments or ideas for future technical content, please type them here:

Comments:

If you would like a reply to your comment, please submit your email address:
Note: We may not respond to all submitted comments.



Have a question about Java programming? Use Java Online Support.