Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
paulorbpinho-fullstacklabs committed Aug 20, 2024
1 parent 993245a commit 45a8b3b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/test/java/com/ning/billing/recurly/TestRecurlyClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2126,21 +2126,17 @@ public void testLineItemInvoiceRefund() throws Exception {
// adjustmentRefund.setQuantity(1);
adjustmentRefund.setPercentage(100);
lineItems.add(adjustmentRefund);
adjustmentRefund2.setPercentage(100);
lineItems.add(adjustmentRefund2);
adjustmentRefund3.setPercentage(100);
lineItems.add(adjustmentRefund3);

final InvoiceRefund refundOptions = new InvoiceRefund();
refundOptions.setRefundMethod(RefundMethod.transaction_first);
refundOptions.setLineItems(lineItems);
final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions);

Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-250));
Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-250));
Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-100));
Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-100));
Assert.assertEquals(refundInvoice.getTransactions().get(0).getAction(), "refund");

Assert.assertEquals(refundInvoice.getLineItems().size(), 3);
Assert.assertEquals(refundInvoice.getLineItems().size(), 1);
final Adjustment lineItem = refundInvoice.getLineItems().get(0);
Assert.assertEquals(lineItem.getQuantity(), new Integer(1));
} finally {
Expand Down

0 comments on commit 45a8b3b

Please sign in to comment.