- Moq needs an interface
- Moq api is used to set the behavior of the generated class
Unity lets you resolve an interface to a concrete implementation.
- Register an interface with the desired concrete implementation
- The concrete implementation can be an instance of class generated by Moq for testing purposes
- In production, the interface is configured to resolve to real implementation classes