Using NSubstitute, how do you mock an exception being thrown in a method retuing a Task?
Let's say our method sig looks something like this:
Task<List<object>> GetAllAsync();
Here's how NSubstitute docs say to mock throwing exceptions for non-void retu types. But this doesn't compile :(
myService.GetAllAsync().Retus(x => { throw new Exception(); });
So how do you accomplish this?
