Exemple #1
0
        public virtual ApiProductModelProductDescriptionCultureResponseModel MapBOToModel(
            BOProductModelProductDescriptionCulture boProductModelProductDescriptionCulture)
        {
            var model = new ApiProductModelProductDescriptionCultureResponseModel();

            model.SetProperties(boProductModelProductDescriptionCulture.ProductModelID, boProductModelProductDescriptionCulture.CultureID, boProductModelProductDescriptionCulture.ModifiedDate, boProductModelProductDescriptionCulture.ProductDescriptionID);

            return(model);
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiProductModelProductDescriptionCultureModelMapper();
            var model  = new ApiProductModelProductDescriptionCultureResponseModel();

            model.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1);
            ApiProductModelProductDescriptionCultureRequestModel response = mapper.MapResponseToRequest(model);

            response.CultureID.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductDescriptionID.Should().Be(1);
        }