This is the Test that i have:
[Test]
public async Task Late_Test()
{
var options = new DBContextOptionsBuilder<MyContext>()
.Options;
using(var context = MyContext(options))
{
//Act?
}
// Assert?
}
This is the service that I am trying to create a test for:
public async Task<int> LatesInMin(Model1 model1, bool isbool)
{
//code here
}
The code int the service also needs the data in the foreign keys attached to Model1.
Can i call a data from the database and use it as the parameter when i call the service? Or do i have to manually provide that data as well? I tried and using linq causes an error and I searched that you cant use extension methods such as 'Where()' and 'FirstOrDefault()'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…