public void RemovePass()
        {
            PassDto solution = SampleEntityDto.CreatePassDto();

            OnTestOfRemove <PassDto, Pass>(
                ref solution,
                service => service.RemovePass(solution));
        }
        public void UpdatePass()
        {
            PassDto solution = SampleEntityDto.CreatePassDto();

            OnTestOfUpdate <PassDto, Pass>(
                ref solution,
                service => { solution.Note = "new note!!!!"; service.UpdatePass(solution); },
                (dto, entity) => dto.Note == entity.Note);
        }
Example #3
0
        public async Task <DataResult <ViewModel> > Handle(Query request, CancellationToken cancellationToken)
        {
            Model.Domain.Pass pass = await _context.Passes.Where(x => x.Id == request.Id).FirstOrDefaultAsync(cancellationToken);

            if (pass is null)
            {
                return(DataResult <ViewModel> .Error(PolishReadableMessage.Pass.NotFound));
            }
            var       serializedParent = JsonConvert.SerializeObject(PassDto.FromPass(pass));
            ViewModel viewModel        = JsonConvert.DeserializeObject <ViewModel>(serializedParent);

            viewModel.MemberId = request.RedirectMemberId;
            return(DataResult <ViewModel> .Success(viewModel));
        }
        public void GetCertificateQualityPass()
        {
            PassDto passDto = SampleEntityDto.CreatePassDto();

            passDto.RN = _nhHelper.Create(Mapper.Map <Pass>(passDto));

            _helper.CreateCoordinatorOfServices(serviceScope =>
            {
                IPlanReceiptOrderService service = serviceScope.CreatePlanService();
                var filterDto  = new PassDto();
                const int skip = 0;
                const int take = 0;
                int total;

                IEnumerable <PassDto> result =
                    service.GetPass(filterDto, skip, take, out total);

                Assert.That(result.Any(), Is.True);
            });
        }
 public virtual void UpdatePass(PassDto entity)
 {
     this.UpdateEntity <Pass, PassDto>(entity);
 }
 public virtual void RemovePass(PassDto entity)
 {
     this.RemoveEntity <Pass, PassDto>(entity);
 }
 public virtual PassDto InsertPass(PassDto entity)
 {
     return(this.AddEntity <Pass, PassDto>(entity));
 }
 public virtual void UpdatePass(PassDto pass)
 {
     throw new NotImplementedException();
 }
 public virtual void RemovePass(PassDto passDto)
 {
     throw new NotImplementedException();
 }
 public virtual PassDto InsertPass(PassDto passDto)
 {
     throw new NotImplementedException();
 }