Test Driven Development
# Mocking framework for .NET
1. Rhino Mocks
Rhino Mocks is a dynamic mock object framework for the .Net platform. Its purpose is to ease testing by allowing the developer to create mock implementations of custom objects and verify the interactions using unit testing.
https://www.hibernatingrhinos.com/oss/rhino-mocks
2. MOQ
The most popular and friendly mocking framework for .NET
https://github.com/moq/moq4
It helps you deal with creating mock implementations for dependencies.
#Dependency Injection
There are also dependency injection containers like Castle Windsor or Ninject which can handle instantiating the controllers with the correct type of DBContext and other dependencies, and make it easy to toggle between the fake and real versions of objects throughout the application.
1. Ninject
Ninject helps you use the technique of dependency injection to break your applications into loosely-coupled, highly-cohesive components, and then glue them back together in a flexible manner.
http://www.ninject.org/
2. Castle Windsor
Castle Windsor is a best of breed, mature Inversion of Control container available for .NET and Silverlight.
http://www.castleproject.org/projects/windsor/
https://github.com/castleproject/Windsor
Note: For Instantly share or get code, notes, and snippets.
https://gist.github.com/
# Mocking framework for .NET
1. Rhino Mocks
Rhino Mocks is a dynamic mock object framework for the .Net platform. Its purpose is to ease testing by allowing the developer to create mock implementations of custom objects and verify the interactions using unit testing.
https://www.hibernatingrhinos.com/oss/rhino-mocks
2. MOQ
The most popular and friendly mocking framework for .NET
https://github.com/moq/moq4
It helps you deal with creating mock implementations for dependencies.
#Dependency Injection
There are also dependency injection containers like Castle Windsor or Ninject which can handle instantiating the controllers with the correct type of DBContext and other dependencies, and make it easy to toggle between the fake and real versions of objects throughout the application.
1. Ninject
Ninject helps you use the technique of dependency injection to break your applications into loosely-coupled, highly-cohesive components, and then glue them back together in a flexible manner.
http://www.ninject.org/
2. Castle Windsor
Castle Windsor is a best of breed, mature Inversion of Control container available for .NET and Silverlight.
http://www.castleproject.org/projects/windsor/
https://github.com/castleproject/Windsor
Note: For Instantly share or get code, notes, and snippets.
https://gist.github.com/
Comments
Post a Comment