Developer conference  7-11 November  Malmö Sweden

Session

THU

10.20 - 11.00

Built-in Fake Objects

Level: Advanced

While mock objects are perfect instruments for unit testing, mocking through mock frameworks may turn your unit tests into an unmaintainable mess. Thanks to them we often hear that "mocking is bad" and "mocking is evil". The root cause of this complexity is that our objects are too big. They have many methods and these methods return other objects, which also have methods. When we pass a mock version of such an object as a parameter, we should make sure that all of its methods return valid objects. Read: http://www.yegor256.com/2014/09/23/built-in-fake-objects.html

Other sessions - Yegor Bugayenko

Partners

Best companies

Founder