public async Task DisplayAllManager() { var context = CreateContextForSQLite(); var testManagerDb = GetTestManager(context); var controller = new ManagersController(testManagerDb); var managerIds = testManagerDb.Managers.Select(m => m.ManagerId).Distinct().ToList(); var expected = (await testManagerDb.Employees.ToListAsync()) .Where(e => managerIds.Contains(e.Id)) .ToList(); var result = await controller.GetAllManagers(); Assert.Equal(expected, result.Value); }