O'Reilly logo

Test-Driven Development with Mockito by Sujoy Acharya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding TDD – a real-life example

We will apply TDD for a healthcare domain problem.

Definition

Design a healthcare system for an imaginary health service provider Q2HS (Quickest Quality Health Service). Q2HS is new to healthcare and doesn't have tie-ups with any insurance company. They need a system to generate bills and receive money from patients. The bill will include patients' account numbers, procedure details, and charges. The system should support all available payment options.

Common healthcare vocabulary

Different languages/words create ambiguity and confusion. So, if we have a common vocabulary that everyone understands, it gives clarity.

Also, proper naming doesn't need any documentation. Metaphors or commonly-used names for classes/methods ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required