Umbraco v10 .Net 6.0 Unit Testing

20 views Asked by At

I am trying to write unit tests for Umbraco v10 using .Net 6 for testing the controllers.

The issue I have is with the setup of the UmbracoContext. Documentation is limited on the subject. The UmbracoContext.EnsureContext is my starting point by passing in mocked dependencies using the Moq framework.

Is there any documentation to support the use of the method? Or should I be looking elsewhere?

I require the CurrentPage object to be correctly instantiated from the UmbracoPageController by setting the context.

0

There are 0 answers