コード例 #1
0
        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);
        }
コード例 #2
0
        // GET: Inspection
        public async Task <ActionResult> Index()
        {
            ViewData["CurrentUser"] = Request.Cookies["CurrentUser"];

            return(View(await _questionnaireService.GetPlannedInspections(int.Parse(Request.Cookies["CurrentUserId"]))));
        }