WorldpayAavResponsePopulator implements Populator<PaymentReply, WorldpayAavResponseModel> { @Override public void populate(final PaymentReply source, final WorldpayAavResponseModel target) throws ConversionException { target.setAavAddressResultCode(source.getAavAddressResultCode()); target.setAavCardholderNameResultCode(source.getAavCardholderNameResultCode()); target.setAavEmailResultCode(source.getAavEmailResultCode()); target.setAavPostcodeResultCode(source.getAavPostcodeResultCode()); target.setAavTelephoneResultCode(source.getAavTelephoneResultCode()); }  @Override void populate(final PaymentReply source, final WorldpayAavResponseModel target);  }
@Test public void shouldPopulateAavAddressResultCode() throws Exception { testObj.populate(paymentReplyMock, worldpayAavResponseModel); assertEquals(AAV_ADDRESS_RESULT_CODE, worldpayAavResponseModel.getAavAddressResultCode()); }
@Test public void shouldPopulateAavCardholderNameResultCode() throws Exception { testObj.populate(paymentReplyMock, worldpayAavResponseModel); assertEquals(AAV_CARDHOLDER_NAME_RESULT_CODE, worldpayAavResponseModel.getAavCardholderNameResultCode()); }
@Test public void shouldPopulateAavEmailResultCode() throws Exception { testObj.populate(paymentReplyMock, worldpayAavResponseModel); assertEquals(AAV_EMAIL_RESULT_CODE, worldpayAavResponseModel.getAavEmailResultCode()); }
@Test public void shouldPopulateAavPostcodeResultCode() throws Exception { testObj.populate(paymentReplyMock, worldpayAavResponseModel); assertEquals(AAV_POSTAL_CODE_RESULT_CODE, worldpayAavResponseModel.getAavPostcodeResultCode()); }
@Test public void shouldPopulateAavTelephoneResultCode() throws Exception { testObj.populate(paymentReplyMock, worldpayAavResponseModel); assertEquals(AAV_TELEPHONE_RESULT_CODE, worldpayAavResponseModel.getAavTelephoneResultCode()); }