The interface IApprovalDefinitionRepository has some basic methods I can mock against but if I want to unit test the _approvalDefinitionRepository.GetAsync(ContentReference), that I guess many will use, it's extremely more work to be done to mock.
Before reaching the interface and method IApprovalDefinitionRepository.GetItemsAsync(IEnumerable()) that is unit test friendly we go through several static classes/methods (at least one is even internal). It's not that easy to unit test.
Please make it more unit test friendly so that instead of looking at Uris in the IApprovalDefinitionRepository.GetItemsAsync(IEnumerable()) I can match against ContentReferences in _approvalDefinitionRepository.GetAsync(ContentReference).
The interface IApprovalDefinitionRepository has some basic methods I can mock against but if I want to unit test the _approvalDefinitionRepository.GetAsync(ContentReference), that I guess many will use, it's extremely more work to be done to mock.
Before reaching the interface and method IApprovalDefinitionRepository.GetItemsAsync(IEnumerable()) that is unit test friendly we go through several static classes/methods (at least one is even internal). It's not that easy to unit test.
Please make it more unit test friendly so that instead of looking at Uris in the IApprovalDefinitionRepository.GetItemsAsync(IEnumerable()) I can match against ContentReferences in _approvalDefinitionRepository.GetAsync(ContentReference).
Example
_approvalDefinitionRepository.Setup(x => x.GetItemsAsync(It.IsAny
return new List
would be more easy if I could just do
_approvalDefinitionRepository.Setup(x => x.GetAsync(myContentReference)).ReturnAsync(...);