Episerver Unit Testing


Writing well tested and reliable code should be the aim of every developer who works with Episerver.  This section covers some of the techniques to write unit tests within Episerver.

1

Episerver 7 : Unit Testing Redirects In Controllers

Testing RedirectToAction If you want to unit test your controllers at some stage, you'll want to test your Action Results. In Epi-Server, it is very likely you may want to Redirect to another episerver page from an MVC controller, e.g. a redirect to[...]

2

Episerver 7 : Unit Testing Using Fakes – Unit Testing Part 3

This is the third post in my unit testing series.  So far we have created a single Epi Dependencies class to manage ll or Epi Servers API in a single place.  In the second post, we created some basic unit tests using Moq to mock up these dependencies[...]

3

Episerver 7 : Unit Testing Using Mocks - Unit Testing Part 2

This is the second part of my unit testing series.  In Unit Testing Part 1 I discussed simple ways that you can organise your project so all the Episerver API dependencies are hidden away in a single file to help improve your sites testability. As of[...]

4

How To Unit Test Episerver Commerce

This might be a bit of a painful post for some people.  Episerver CMS has made amazing progress in the last few years towards creating a platform that is very easy to unit test.  Episerver commerce is making baby steps towards this goal as well, but [...]

5

How To Use Moq To Unit Test Episerver

Mocking the Content Repository One of the most useful unit testing tools available to you as a developer is Moq.  Moq is a lightweight mocking framework that will allow you to get a lot more test coverage in your projects.  If you have never used a [...]

Back to top