Unit Testing Sitecore

Unit testing is a very popular topic, and is a very good practice to adopt. Unfortunately, as anyone who has worked with it will know, some common Sitecore classes can’t be mocked or be directly instantiated. So, the logical solution is to let your unit tests access the Sitecore API and databases. This post contains some instructions on how I do this.

Setting Sitecore ImageField

Update: this post uses an older version of the Sitecore API. For an up-to-date solution, please see this updated article. Recently I had to write something to allow users to upload their own content on a Sitecore site. Not an unusual, or especially difficult, piece of functionality but one thing that did give me a […]