Пример #1
0
        public virtual ApiSaleTicketsServerRequestModel MapServerResponseToRequest(
            ApiSaleTicketsServerResponseModel response)
        {
            var request = new ApiSaleTicketsServerRequestModel();

            request.SetProperties(
                response.SaleId,
                response.TicketId);
            return(request);
        }
        public void MapModelToEntity()
        {
            var mapper = new DALSaleTicketsMapper();
            ApiSaleTicketsServerRequestModel model = new ApiSaleTicketsServerRequestModel();

            model.SetProperties(1, 1);
            SaleTickets response = mapper.MapModelToEntity(1, model);

            response.SaleId.Should().Be(1);
            response.TicketId.Should().Be(1);
        }