Beispiel #1
0
        public void MapBOToModelList()
        {
            var mapper = new BOLProductProductPhotoMapper();
            BOProductProductPhoto bo = new BOProductProductPhoto();

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

            response.Count.Should().Be(1);
        }
Beispiel #2
0
        public void MapBOToModel()
        {
            var mapper = new BOLProductProductPhotoMapper();
            BOProductProductPhoto bo = new BOProductProductPhoto();

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

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Primary.Should().Be(true);
            response.ProductID.Should().Be(1);
            response.ProductPhotoID.Should().Be(1);
        }