liveBook · Manning

Domain model

As explained in Unit Testing Principles, Practices, and Patterns

A software model representing the concepts, rules, and behavior of an application domain.

A domain model represents the concepts, rules, and behavior of an application domain. Because it contains the system’s business logic, it usually deserves the greatest unit-testing attention and offers the strongest return on testing effort. section 1.4

Keep the domain model central to a maintainable testing strategy:

  • Isolate it from infrastructure code, external services, databases, and other application concerns so unit tests can target business logic directly. section 1.4
  • Test less-critical code briefly or indirectly, while using integration tests when broader system behavior matters. section 1.4
  • Treat testing attention as an investment: complex infrastructure algorithms may still merit thorough tests, but the domain model remains the default focus. section 1.4

How Unit Testing Principles, Practices, and Patterns covers it

How deep it goes
Defines the domain model and explains its testing priority, but defers detailed isolation techniques.
Examples
Uses unit tests, integration tests, infrastructure algorithms, databases, and third-party systems as contrasting testing targets.
What you can do after
Apply it via unit testing by isolating business logic and concentrating effort on the most valuable behavior.
How it connects
Connects domain models with business logic, unit testing, integration testing, and infrastructure code.

Also explained in

Compare how 8 books explain domain model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Unit Testing Principles, Practices, and Patterns. The section links point to the parts of the book it draws on.