public void MapEntityToModelList() { var mapper = new DALPostLinkMapper(); PostLink item = new PostLink(); item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1); List <ApiPostLinkServerResponseModel> response = mapper.MapEntityToModel(new List <PostLink>() { { item } }); response.Count.Should().Be(1); }
public void MapEntityToModel() { var mapper = new DALPostLinkMapper(); PostLink item = new PostLink(); item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1); ApiPostLinkServerResponseModel response = mapper.MapEntityToModel(item); 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); }