public virtual ApiLinkLogServerRequestModel MapServerResponseToRequest( ApiLinkLogServerResponseModel response) { var request = new ApiLinkLogServerRequestModel(); request.SetProperties( response.DateEntered, response.LinkId, response.Log); return(request); }
public void MapModelToEntity() { var mapper = new DALLinkLogMapper(); ApiLinkLogServerRequestModel model = new ApiLinkLogServerRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A"); LinkLog response = mapper.MapModelToEntity(1, model); response.DateEntered.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.LinkId.Should().Be(1); response.Log.Should().Be("A"); }