unit test components and frameworks in dotnet

In unit test we, need these the following components.

  • Test runners
  • Unit test framework
  • Mock framework
  • Optional Framework

Test runners

For running your test cases, some examples of test runners

  • Visual studio test browser (free with Visual studio comunity edition)
  • Resharper Test (not free)
  • Console App of NUnit, xUnit

Unit test framework

For writing your test cases, some examples of unit test frameworks

  • NUnit (based from JUnit in Java)
  • xUnit (used in DotNet core project)

Mock framework

For isolating a dependency in your tests, some examples of mock frameworks

  • Moq (free)
  • Rhino Mock (fee)
  • NSubstitute (fee)
  • TypeMock (not free but has some advance mock features)

Optional Framework

For making your assertion easy to read

  • Fluent Assertion (free)