public virtual ApiProductPhotoResponseModel MapBOToModel( BOProductPhoto boProductPhoto) { var model = new ApiProductPhotoResponseModel(); model.SetProperties(boProductPhoto.ProductPhotoID, boProductPhoto.LargePhoto, boProductPhoto.LargePhotoFileName, boProductPhoto.ModifiedDate, boProductPhoto.ThumbNailPhoto, boProductPhoto.ThumbnailPhotoFileName); return(model); }
public void MapResponseToRequest() { var mapper = new ApiProductPhotoModelMapper(); var model = new ApiProductPhotoResponseModel(); model.SetProperties(1, BitConverter.GetBytes(1), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), BitConverter.GetBytes(1), "A"); ApiProductPhotoRequestModel response = mapper.MapResponseToRequest(model); response.LargePhoto.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.LargePhotoFileName.Should().Be("A"); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ThumbNailPhoto.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.ThumbnailPhotoFileName.Should().Be("A"); }