コード例 #1
0
        public void Add_TryToCreate_RepositoryShouldCallOnce()
        {
            //act
            var shedule = new SheduleDTO
            {
                Auditorys_Number = It.IsAny <int>(),
                Day    = It.IsAny <int>(),
                Pair   = It.IsAny <int>(),
                UserId = It.IsAny <int>(),
                Group  = It.IsAny <int>()
            };

            sheduleService.AddShedule(shedule);

            //assert
            uow.Verify(x => x.Shedules.Create(It.IsAny <Shedule>()), Times.Once);
        }
コード例 #2
0
 // POST: api/Shedule
 public void Post([FromBody] SheduleModel value)
 {
     SheduleLogic.AddShedule(SheduleControllerMapper.Map <SheduleModel, SheduleDTO>(value));
 }