Unit Test More Efficiently with Mock Object Alternatives

The mock-object testing pattern has commonly been used to test an individual unit of code without testing its dependencies. While this pattern works well for interaction-based testing, it can be overkill for state-based testing. Learn how to streamline your unit-testing using stubs and the pseudo-objects testing pattern.

by Javid Jamae

モックオブジェクトテストパターンは、依存性なしに一つのコード単位をテストするのに一般的に用いられてきた。このパターンは相互作用中心のテストには効果を発揮するものの、状態中心のテストでは手間がかかりすぎてしまうことがある。スタブや擬似オブジェクトテストパターンを使って単体テストを合理化する方法を学ぼう。

byジェイビッド・ジャメイ