Removing the primitive obsession with status as int

We have decided to also tackle the optional item in our to-do list.

The to-do list:

  • Dependency injection in BooksEndpoint for books
  • Change status for statuses
  • Remove the primitive obsession with status (optional)
The smell: Primitive obsession involves using primitive data types to represent domain ideas. For example, we use a string to represent a message, an integer to represent an amount of money, or a struct/dictionary/hash to represent a specific object.  The source is http://c2.com/cgi/wiki?PrimitiveObsession.

As this is a refactor step (that is, we are not introducing any new behavior into the system), we don't need any new specification. We will proceed and try to always stay ...

Get Test-Driven Java Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.