The document discusses configurable test doubles, which are test doubles that can be configured through an interface to behave differently for different tests. This avoids hard-coding test doubles and duplication. Configurable test doubles can be implemented using a mocking framework or hand-built. They allow defining the system under test interaction through a configuration that specifies the test double behavior.
The document discusses configurable test doubles, which are test doubles that can be configured through an interface to behave differently for different tests. This avoids hard-coding test doubles and duplication. Configurable test doubles can be implemented using a mocking framework or hand-built. They allow defining the system under test interaction through a configuration that specifies the test double behavior.
4. How it Works
• SUTがテストのための振る舞いをサポー
トするために、SUTやDOCに直接の
フックを導入する。
• これはある種のtesting flagを使用し、必
要な箇所でチェックすることによって
実装される。
2010年11月14日日曜日
5. When to Use It
• 時として、このような最終手段を取る
ことができる。それは、Dependency
LookupやDependency Injectionのような
方法が取れない場合。
• 依存性のハードコードに端を発する、
「テストされないコードに対応するた
めに、Test Hookを使用する。
2010年11月14日日曜日