Growing Object-Oriented Software, Guided By Tests (chapter 3)

Feb 06, 22

Chapter 3

Will just be a short post - chapter 3 of the book introduces Java specific tools that will be used throughout the book. Loosely, the tools will take care of the below:

  • Test classes (setup and teardown of test environment)
  • Fixtures (static data that is used to ensure consistency in tests)
  • Assertion matchers (a noice interface for making assertions against objects being tested)
  • Mock objects (does what it says on the tin)

All of these should be available in your language of choice.

Ruby has RSpec and minitest which encapsulate all of the above.

Go has a package called testify, however the original author has moved away from the ‘everything and the kitchen sink’, to a more lightweight framework called is.

I think as a learning exercise it may be good to complete exercises from the book (if there are any?), in a different language.

This should help to cement my understanding of the underlying concepts, rather than being tied to the Java implementations that the authors present.