liveBook · Manning

System edge

As explained in Unit Testing Principles, Practices, and Patterns

The boundary location where an application directly communicates with an external or unmanaged dependency.

A system edge is the boundary where application code directly communicates with an unmanaged dependency. Interaction verification is strongest at that boundary, not against intermediate wrappers. section 9.1

Apply the boundary rule by:

  • Keeping wrappers separate when one hides an external library and another centralizes domain-specific messages. section 9.1

Email-change integration test

A test constructs MessageBus with a bus mock, runs UserController.ChangeEmail, and verifies one exact external message. A BusSpy offers the same check through readable assertions.

How Unit Testing Principles, Practices, and Patterns covers it

How deep it goes
Defines the boundary, classifies wrapper layers, and demonstrates mock and spy refactorings, stopping short of broader dependency-management theory.
Examples
Uses IBus, IMessageBus, MessageBus, EventDispatcher, an email-change scenario, and a handwritten BusSpy.
What it assumes
Assumes familiarity with interfaces, integration tests, mocking, and application wrappers.
What you can do after
Diagnose interaction tests by locating the true external boundary and verify the translated call there.
How it connects
Connects unmanaged dependencies, integration testing, mocks, spies, wrappers, message buses, and event dispatchers.

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.