Hello Friends,
I need to implement MOQ unit testing for my Umbraco 8 application. I have followed the Umbraco 8 unit testing documentation and implemented the same.
We write our business logic code and API calls in controllers. To accessing the admin content we are using the generated models. Here my challenge is, not able to mock the generated model properties and Umbraco.Web.PublishedContentExtensions methods.
I know the extension methods are static and we are not able to mock. Here my question is, Is it possible to mock the Umbraco 8 related objects. or Do we have any other solution to implement MOQ unit test cases for Umbraco 8 content?
If you have any solution or sample code please share here.
Umbraco 8 unit testing
Hello Friends, I need to implement MOQ unit testing for my Umbraco 8 application. I have followed the Umbraco 8 unit testing documentation and implemented the same.
We write our business logic code and API calls in controllers. To accessing the admin content we are using the generated models. Here my challenge is, not able to mock the generated model properties and Umbraco.Web.PublishedContentExtensions methods.
I know the extension methods are static and we are not able to mock. Here my question is, Is it possible to mock the Umbraco 8 related objects. or Do we have any other solution to implement MOQ unit test cases for Umbraco 8 content?
If you have any solution or sample code please share here.
is working on a reply...