public void MapEFToBOList() { var mapper = new DALProductPhotoMapper(); ProductPhoto entity = new ProductPhoto(); entity.SetProperties(BitConverter.GetBytes(1), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, BitConverter.GetBytes(1), "A"); List <BOProductPhoto> response = mapper.MapEFToBO(new List <ProductPhoto>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALProductPhotoMapper(); ProductPhoto entity = new ProductPhoto(); entity.SetProperties(BitConverter.GetBytes(1), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, BitConverter.GetBytes(1), "A"); BOProductPhoto response = mapper.MapEFToBO(entity); 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"); }