public virtual ApiVotesResponseModel MapBOToModel( BOVotes boVotes) { var model = new ApiVotesResponseModel(); model.SetProperties(boVotes.Id, boVotes.BountyAmount, boVotes.CreationDate, boVotes.PostId, boVotes.UserId, boVotes.VoteTypeId); return(model); }
public void MapResponseToRequest() { var mapper = new ApiVotesModelMapper(); var model = new ApiVotesResponseModel(); model.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1); ApiVotesRequestModel response = mapper.MapResponseToRequest(model); response.BountyAmount.Should().Be(1); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.PostId.Should().Be(1); response.UserId.Should().Be(1); response.VoteTypeId.Should().Be(1); }