I have custom repository. But default tests (it is not unit tests, looks like integration) using in memory db, and for unit test my repository, I need create a lot of relations just for test, it`s awful.
For example I have repos with method like this:
and I need unit test calculation, in normal way without boilerplate, I can mock dbContext, and override return Medications dbSet
and calculate and after compare it. But in boilerplate I can`t mock my dbContext.
Just for example there are not constructor without params:
And I can`t mock it by EntityFrameworkCoreMock.Moq
Unit Test Boilerplate Generator creates test like this:
And how I can mock my dbSet here, because we have provider, where and how I need mock it for unit testing?
In documentation and also in source code I didn`t find any unit test example.
How test it?