Guerilla Unit Testing Part 2: The Weird and Wonderful EasyMock
In part two (of two) we go in depth on EasyMock, the weird and wonderful tool for creating mock objects on the fly. We'll do a good bit of live coding as we examine how to use, tame and extend this powerful tool.
Unit testing with only gets you so far; even when you've refactored your code and hidden all your implementations behinds interfaces you are still stuck with the problem of testing the individual pieces. If you've hit this point and despaired, know that there are tools to help ... including the weird and wonderful EasyMock. We'll discuss unit testing in general, and how EasyMock is used to to generate mock objects, allowing you test each class in isolation. We'll be doing some live coding to show you step-by-step how to build up a unit test, interpret EasyMock's baffling error messages, and set yourself up for easy reuse of testing code.
About Howard Lewis Ship
Howard Lewis Ship is the creator and lead developer for the Apache Tapestry project, and is a noted expert on Java framework design and developer productivity. He has over twenty years of full-time software development under his belt, with over ten years of Java. He cut his teeth writing customer support software for Stratus Computer, but eventually traded PL/1 for Objective-C and NeXTSTEP before settling into Java.
Howard is respected in the Java community as an expert on web application development, dependency injection, Java meta-programming, and developer productivity. He is a frequent speaker at JavaOne, NoFluffJustStuff, ApacheCon and other conferences, and the author of "Tapestry in Action" for Manning (covering Tapestry 3.0). Lately, he's been dipping his toes into alternate languages, including Clojure.
Howard is an independent consultant, offering Tapestry training, mentoring and project work as well as training in Clojure. He lives in Portland, Oregon with his wife Suzanne, and his son, Jacob.
More About Howard »
