Esempio n. 1
0
        public void MapBOToModelList()
        {
            var mapper = new BOLVProductAndDescriptionMapper();
            BOVProductAndDescription bo = new BOVProductAndDescription();

            bo.SetProperties("A", "A", "A", 1, "A");
            List <ApiVProductAndDescriptionResponseModel> response = mapper.MapBOToModel(new List <BOVProductAndDescription>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Esempio n. 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLVProductAndDescriptionMapper();
            ApiVProductAndDescriptionRequestModel model = new ApiVProductAndDescriptionRequestModel();

            model.SetProperties("A", "A", 1, "A");
            BOVProductAndDescription response = mapper.MapModelToBO("A", model);

            response.Description.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProductID.Should().Be(1);
            response.ProductModel.Should().Be("A");
        }
Esempio n. 3
0
        public void MapBOToModel()
        {
            var mapper = new BOLVProductAndDescriptionMapper();
            BOVProductAndDescription bo = new BOVProductAndDescription();

            bo.SetProperties("A", "A", "A", 1, "A");
            ApiVProductAndDescriptionResponseModel response = mapper.MapBOToModel(bo);

            response.CultureID.Should().Be("A");
            response.Description.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProductID.Should().Be(1);
            response.ProductModel.Should().Be("A");
        }