O'Reilly logo

Scala Test-Driven Development by Gaurav Sood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Fakes

Fake objects are working implementations of the interface or trait. This implementation is not production-like but instead takes a shortcut. Therefore, a fake object is just confined to the test harness and does not make it to the production code.

Fakes are dumb implementations and do not have any concept of expectations and verifications. Fakes arise from the school of thought that the interaction of the behavior of the dependency should not be a matter of concern for a test that is concentrating on testing the client.

Fakes

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required