testcase to check item is null or not.
foreach (var fileName in filelist)
{
var item = await fileInfoContextService.GetFileInfo(projectId, fileName);
if (item == null)
{
await fileInfoContextService.InsertFileInfo(projectId, fileName, FileStatus.NotStarted);
}
}
Mario ScheerenPosted Jan 13, 2022, 3:54 PM
Test the methods not the foreach.
Test1 fileInfoContextService.GetFileInfo expect positive
Test2 fileInfoContextService.GetFileInfo expect negative / exception
Test3 fileInfoContextService.InsertFileInfo expect positive
Test4 fileInfoContextService.InsertFileInfo expect negative / exception