❔ IAsyncEnumerable and IQueriable unit testing
I have an interface of the repository, which has a method Query<T>. This method should return IQueryble<T>
Now I wrote a service where I use this method to get some data from a database.
In this service, I'm doing something like that.
So now I need to write a unit test for it.
And this is a problem because I'm dealing with IAsyncEnumerables here.
I have a mock setup
But it doesn't work because List<T> obviously doesn't implement IAsyncEnumerable.
Any ideas on how to make it work?
Now I wrote a service where I use this method to get some data from a database.
In this service, I'm doing something like that.
So now I need to write a unit test for it.
And this is a problem because I'm dealing with IAsyncEnumerables here.
I have a mock setup
But it doesn't work because List<T> obviously doesn't implement IAsyncEnumerable.
Any ideas on how to make it work?