public async void AddAbsence(string reason) { var sickness = await _sicknessService.AddAbsence(1, reason, null); Assert.NotNull(sickness); Assert.True(_sicknessService.IsSick(1)); _dbMock.Verify(x => x.SaveChangesAsync(), Times.Once); }
public IActionResult Index() { ViewData["CurrentUser"] = Request.Cookies["CurrentUser"]; return(_sicknessService.IsSick(int.Parse(Request.Cookies["CurrentUserID"])) ? View("Better") : View()); }