public virtual ApiTransactionServerRequestModel MapServerResponseToRequest( ApiTransactionServerResponseModel response) { var request = new ApiTransactionServerRequestModel(); request.SetProperties( response.Amount, response.ArtistId, response.DateCreated, response.StripeTransactionId); return(request); }
public void MapModelToEntity() { var mapper = new DALTransactionMapper(); ApiTransactionServerRequestModel model = new ApiTransactionServerRequestModel(); model.SetProperties(1m, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); Transaction response = mapper.MapModelToEntity(1, model); response.Amount.Should().Be(1m); response.ArtistId.Should().Be(1); response.DateCreated.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.StripeTransactionId.Should().Be("A"); }