public void MapEFToBOList() { var mapper = new DALPostLinksMapper(); PostLinks entity = new PostLinks(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1, 1); List <BOPostLinks> response = mapper.MapEFToBO(new List <PostLinks>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALPostLinksMapper(); PostLinks entity = new PostLinks(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1, 1); BOPostLinks response = mapper.MapEFToBO(entity); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Id.Should().Be(1); response.LinkTypeId.Should().Be(1); response.PostId.Should().Be(1); response.RelatedPostId.Should().Be(1); }
public void MapBOToEF() { var mapper = new DALPostLinksMapper(); var bo = new BOPostLinks(); bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1); PostLinks response = mapper.MapBOToEF(bo); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Id.Should().Be(1); response.LinkTypeId.Should().Be(1); response.PostId.Should().Be(1); response.RelatedPostId.Should().Be(1); }