public void MapBOToModelList() { var mapper = new BOLProductPhotoMapper(); BOProductPhoto bo = new BOProductPhoto(); bo.SetProperties(1, BitConverter.GetBytes(1), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), BitConverter.GetBytes(1), "A"); List <ApiProductPhotoResponseModel> response = mapper.MapBOToModel(new List <BOProductPhoto>() { { bo } }); response.Count.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLProductPhotoMapper(); BOProductPhoto bo = new BOProductPhoto(); bo.SetProperties(1, BitConverter.GetBytes(1), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), BitConverter.GetBytes(1), "A"); ApiProductPhotoResponseModel response = mapper.MapBOToModel(bo); 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.ProductPhotoID.Should().Be(1); response.ThumbNailPhoto.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.ThumbnailPhotoFileName.Should().Be("A"); }