Mocking with Mockery

Mockery is a mock object framework that may be used with any unit testing framework. It is a flexible and human-readable domain specific language (DSL) for mocking objects in unit tests. With it, we can create some pretty powerful tests and even test legacy code containing hard dependencies. In this talk, I’ll show how to get started with Mockery. I’ll start with some basic mocking techniques and then move on to cover more advanced topics, including static methods, partial mocks, final classes, and hard dependencies.

Friday, Jan 15th, 10:00am-10:50am
Medium Conference

About Ben Ramsey

Ben Ramsey is a web craftsman, author, and speaker. He is a software architect at ShootProof, where he builds a platform for professional photographers. He enjoys organizing user groups and contributing to open source software. Ben blogs at and is @ramsey on Twitter.