public virtual ApiTransactionServerRequestModel MapServerResponseToRequest( ApiTransactionServerResponseModel response) { var request = new ApiTransactionServerRequestModel(); request.SetProperties( response.Amount, response.GatewayConfirmationNumber, response.TransactionStatusId); return(request); }
public void MapModelToEntity() { var mapper = new DALTransactionMapper(); ApiTransactionServerRequestModel model = new ApiTransactionServerRequestModel(); model.SetProperties(1m, "A", 1); Transaction response = mapper.MapModelToEntity(1, model); response.Amount.Should().Be(1m); response.GatewayConfirmationNumber.Should().Be("A"); response.TransactionStatusId.Should().Be(1); }