예제 #1
0
        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);
        }
예제 #2
0
 public IActionResult Index()
 {
     ViewData["CurrentUser"] = Request.Cookies["CurrentUser"];
     return(_sicknessService.IsSick(int.Parse(Request.Cookies["CurrentUserID"])) ? View("Better") : View());
 }