Beispiel #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLProductModelProductDescriptionCultureMapper();
            ApiProductModelProductDescriptionCultureRequestModel model = new ApiProductModelProductDescriptionCultureRequestModel();

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

            response.CultureID.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductDescriptionID.Should().Be(1);
        }
Beispiel #2
0
        public void MapBOToModelList()
        {
            var mapper = new BOLProductModelProductDescriptionCultureMapper();
            BOProductModelProductDescriptionCulture bo = new BOProductModelProductDescriptionCulture();

            bo.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1);
            List <ApiProductModelProductDescriptionCultureResponseModel> response = mapper.MapBOToModel(new List <BOProductModelProductDescriptionCulture>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Beispiel #3
0
        public void MapBOToModel()
        {
            var mapper = new BOLProductModelProductDescriptionCultureMapper();
            BOProductModelProductDescriptionCulture bo = new BOProductModelProductDescriptionCulture();

            bo.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1);
            ApiProductModelProductDescriptionCultureResponseModel response = mapper.MapBOToModel(bo);

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