Test Doubles: creating a Test Spy

In this series of posts about Test Doubles we’ve looked at the manual and tool-aided creation of a dummy object and the use of the test stub. Now it’s time to discuss the creation of […]

Test Doubles: creating a Test Stub

In this series of posts about Test Doubles we’ve looked at the manual and tool-aided creation of a dummy object. Now it’s time to discuss the creation of a stub. The stub is defined as […]

Test Doubles: creating a Dummy Object using a mocking framework

In this series of posts about Test Doubles we’ll look at five examples. In the previous post we looked the manual creation of a dummy object. The conclusion was that the manual approach is functional […]

Test Doubles: creating a Dummy Object manually

In this series of posts about Test Doubles we’ll look at five examples. The Dummy Object is the first and most straightforward. Its definition is: A placeholder object that is passed to the SUT as […]

Test Doubles for the win

Test Doubles

When writing unit or contract tests you encounter situations in which you need mock things. Given you want to test a method in Class A that uses a collaborator (class / interface B). When you […]