Quantcast
Viewing all articles
Browse latest Browse all 764

Unit Testing Save of editable stereotypes with Moq

we are using Moq with csla for unit testing. Moq is working fine with mocking fetch calls but not working with mocking save call of editable business base.

 While saving, as we mock the child lists "create" calls, editable BO becomes invalid and hence not savable. As it is pure mocking and child create call is not run, so business rules of list and list items dont fire, so not sure why the mocked list shows invalid.

Please respond back with article/code sample on how to mock save of editable BO and editable BO lists with Moq.

 

Thanks !!


Viewing all articles
Browse latest Browse all 764

Trending Articles