use of com.mirakl.client.mmp.domain.invoice.MiraklInvoice in project mirakl-hyperwallet-connector by paypal.
the class MiraklInvoiceToCreditNoteModelConverterTest method convert_shouldConvertFromMiraklInvoiceToCreditNoteModel.
@Test
void convert_shouldConvertFromMiraklInvoiceToCreditNoteModel() {
final MiraklInvoice miraklInvoiceStub = new MiraklInvoice();
miraklInvoiceStub.setId("2000050");
miraklInvoiceStub.setShopId(2000L);
miraklInvoiceStub.setTotalChargedAmount(BigDecimal.valueOf(20.00D));
miraklInvoiceStub.setCurrencyIsoCode(MiraklIsoCurrencyCode.EUR);
final CreditNoteModel result = testObj.convert(miraklInvoiceStub);
assertThat(result.getInvoiceNumber()).isEqualTo("2000050");
assertThat(result.getShopId()).isEqualTo("2000");
assertThat(result.getCreditAmount()).isEqualTo(20.00D);
assertThat(result.getCurrencyIsoCode()).isEqualTo("EUR");
}
Aggregations