public void RemoveShedule_TryToRemoveShedule_RepositoryShouldCallOnce()
        {
            //arrange
            sheduleRepository.Setup(x => x.FindById(It.IsAny <int>())).Returns(new Shedule
            {
                Auditorys_Number = It.IsAny <int>(),
                Day    = It.IsAny <int>(),
                Pair   = It.IsAny <int>(),
                UserId = It.IsAny <int>(),
                Group  = It.IsAny <int>()
            });

            //act
            sheduleService.DeleteShedule(It.IsAny <int>());

            //assert
            uow.Verify(x => x.Shedules.Remove(It.IsAny <int>()), Times.Once);
        }
示例#2
0
 // DELETE: api/Shedule/5
 public void Delete(int id)
 {
     SheduleLogic.DeleteShedule(id);
 }