public virtual ApiRetweetServerRequestModel MapServerResponseToRequest( ApiRetweetServerResponseModel response) { var request = new ApiRetweetServerRequestModel(); request.SetProperties( response.Date, response.RetwitterUserId, response.Time, response.TweetTweetId); return(request); }
public void MapModelToEntity() { var mapper = new DALRetweetMapper(); ApiRetweetServerRequestModel model = new ApiRetweetServerRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, TimeSpan.Parse("01:00:00"), 1); Retweet response = mapper.MapModelToEntity(1, model); response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.RetwitterUserId.Should().Be(1); response.Time.Should().Be(TimeSpan.Parse("01:00:00")); response.TweetTweetId.Should().Be(1); }