public async void GetPlannedInspectionsShouldReturnListOfPlannedInspections(int employeeId) { var expected = await _dbMock.Object.PlannedInspections .Where(p => p.Employee.Id == employeeId) .Where(p => p.StartTime.Date == DateTime.Now.Date) .ToListAsync(); var actual = await _questionnaireService.GetPlannedInspections(employeeId); Assert.Equal(expected, actual); }
// GET: Inspection public async Task <ActionResult> Index() { ViewData["CurrentUser"] = Request.Cookies["CurrentUser"]; return(View(await _questionnaireService.GetPlannedInspections(int.Parse(Request.Cookies["CurrentUserId"])))); }