Exemplo n.º 1
0
        public virtual ApiSpecialOfferProductResponseModel MapBOToModel(
            BOSpecialOfferProduct boSpecialOfferProduct)
        {
            var model = new ApiSpecialOfferProductResponseModel();

            model.SetProperties(boSpecialOfferProduct.SpecialOfferID, boSpecialOfferProduct.ModifiedDate, boSpecialOfferProduct.ProductID, boSpecialOfferProduct.Rowguid);

            return(model);
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiSpecialOfferProductModelMapper();
            var model  = new ApiSpecialOfferProductResponseModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            ApiSpecialOfferProductRequestModel response = mapper.MapResponseToRequest(model);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductID.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }