public void MapEFToBOList() { var mapper = new DALCommentMapper(); Comment entity = new Comment(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1, "A", 1); List <BOComment> response = mapper.MapEFToBO(new List <Comment>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALCommentMapper(); Comment entity = new Comment(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1, "A", 1); BOComment response = mapper.MapEFToBO(entity); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Id.Should().Be(1); response.PostId.Should().Be(1); response.Score.Should().Be(1); response.Text.Should().Be("A"); response.UserId.Should().Be(1); }
public void MapBOToEF() { var mapper = new DALCommentMapper(); var bo = new BOComment(); bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, "A", 1); Comment response = mapper.MapBOToEF(bo); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Id.Should().Be(1); response.PostId.Should().Be(1); response.Score.Should().Be(1); response.Text.Should().Be("A"); response.UserId.Should().Be(1); }