Mocking internal interfaces

Yesterday I’ve worked on connector library used to access data warehouses provided by two external vendors. In order for it to be easy to use I limited public members to:

  • library interface – can be used to aggregate connectors and testing
  • two connector classes that provide public methods to retrieve prepared responses
  • DTO request and response classes

Continue reading “Mocking internal interfaces”

Mock – my favourite mock engine

When I try to unit test class one of the most important things is to eliminate all dependencies and replace them with proper mocks. Such mocks allow me to fully control inputs that object will access and verify that proper methods have been called.

Recently I’ve written one business logic class that manages┬áSPA (Single Page Application) and uses four different repositories from which it pulls data and presents them as Web API.

Continue reading “Mock – my favourite mock engine”