The set of rules and decisions that implement an application's domain-specific behavior.
Business logic is the domain-specific behavior that determines how an application should act. It usually resides in the domain model, making it the highest-value target for unit testing. section 1.4
Apply these practical rules:
Spend most unit-testing effort on business logic rather than treating every part of the codebase as equally important. section 1.4
Separate the domain model from infrastructure, external services, databases, third-party systems, and glue code so its behavior can be tested directly. section 1.4
Cover less-critical concerns briefly or indirectly, while using integration tests when whole-system behavior matters. section 1.4
How Unit Testing Principles, Practices, and Patterns covers it
How deep it goes
Defines testing priority and isolation boundaries, but defers detailed implementation techniques.
Examples
Contrasts domain models with databases, third-party systems, infrastructure code, and application glue.
What it assumes
Assumes an application contains distinguishable domain, infrastructure, dependency, and integration concerns.
What you can do after
Apply unit testing to isolated domain behavior and use integration tests for broader system interactions.
How it connects
Connects business logic with domain models, unit testing, integration testing, infrastructure code, and external dependencies.
Practices of the Python ProA business logic layer is a software layer that contains application rules and operations governing how inputs are transformed into business outcomes.
ASP.NET Core in Action, 3eBusiness logic is the application behavior that implements domain rules, decisions, and processes independently of presentation or infrastructure concerns.
business ruleincludes · A business rule is a domain-specific policy, condition, or constraint that governs valid data, decisions, actions, or behavior in an organization or its systems.
handlerused by · A handler is a callable or software component that processes an event, request, message, or other input and performs associated processing.
testused by · A test is a procedure or check that evaluates behavior using specified inputs or evidence against expected results or criteria.
multi-tier applicationpart of · A multi-tier application is an application organized into distinct tiers that separate responsibilities and interact through defined dependencies or interfaces.
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.