Unit Testing and mocking UmbracoHelper

Hey guys.

How do you guys Unit Test your Umbraco Solutions?

All my viewmodels fail because UmbracoContext is null and cannot create a UmbracoHelpr without it. So I was wondering: is there any way to mock the UmbracoContext or what alternatives are there to setup unit tests for Umbraco?

I have read some pretty old posts on the Umbraco forum but the best I’ve found was to grab a file/class from the source code (because it has some internal methods that are needed to create the UmbracoContext), which seems highly unnecessary (or at least it should be, IMO).


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/81511-unit-testing-and-mocking-umbracohelper