Posts Tagged ‘JUnit’


Goals of Test Driven Development

Why should you adopt Test Driven Development?  The answer is actually more complex than many people think.

Of course we all want to have fully tested code to ensure that the code operates as expected.  We also want to ensure that any new features do not break existing functionality (regressions), but what other reasons are there?



Using EasyMock to Create Stub Objects

There are two competing philosophies with regard to unit testing strategies; state based testing and behavior based testing. In state based testing we configure a starting state, execute a test method, and then examine the resultant state/returned result. In behavior driven testing we ensure that our test object collaborates with its dependencies in an expected way.