변화 격리

테스트 주도 개발리팩토링 패턴 중 하나. 변화를 가하기 전에 해당 영역을 분리하기.

How do you change one part of a multi-part method or object? First, isolate the part that has to change. The picture that comes to my mind is surgery: The entire patient except the part to be operated on is draped. The draping leaves the surgeon with only a fixed set of variables. …

Some possible ways to isolate change are Extract method (the most common), Extract object, and Method object.

—Chapter 31, Test-driven development: by example

2024 © ak