Is there any recognised way to unit test surface controllers and mock out any dependencies on things like UmbracoHelper, UmbraContext and ContentSurface?
Sure, although its not an exact science at the moment, very much in development. If you get the Umbraco zip and complie you will find a Umbraco.Test dll in the bin. Refrence this dll in your unit testing project.
Unit Testing Surface Controllers
Is there any recognised way to unit test surface controllers and mock out any dependencies on things like UmbracoHelper, UmbraContext and ContentSurface?
Thanks
Matt
Sure, although its not an exact science at the moment, very much in development. If you get the Umbraco zip and complie you will find a Umbraco.Test dll in the bin. Refrence this dll in your unit testing project.
See: http://stackoverflow.com/questions/17832096/unit-testing-a-rendermvccontroller-even-possible
Charlie :)
Thanks Charlie - I finally got around to looking at this again but it looks like this method is only built to work with nunit - we're using mstest.
is working on a reply...