public void GetDisciplineShedule_ShouldCallOnce() { //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 try { sheduleService.GetDisciplineShedule(It.IsAny <string>()); uow.Verify(x => x.Shedules, Times.Once); } catch (Exception ex) { // Assert.That(ex.Message.Contains("You are not registered")); uow.Verify(x => x.Shedules, Times.Never); } //assert }
public IEnumerable <SheduleModel> GetDisciplineShedule(string name) { return(ManagemantMap.Map <IEnumerable <SheduleDTO>, IEnumerable <SheduleModel> >(SheduleLogic.GetDisciplineShedule(name))); }