From d7f1efe795187fc8b5414f77c4eadbbadcb4105a Mon Sep 17 00:00:00 2001 From: Paulo Pinho Date: Tue, 20 Aug 2024 19:49:59 -0300 Subject: [PATCH] f --- .../com/ning/billing/recurly/TestRecurlyClient.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/test/java/com/ning/billing/recurly/TestRecurlyClient.java b/src/test/java/com/ning/billing/recurly/TestRecurlyClient.java index 27d83d4b..e5d48567 100644 --- a/src/test/java/com/ning/billing/recurly/TestRecurlyClient.java +++ b/src/test/java/com/ning/billing/recurly/TestRecurlyClient.java @@ -2001,19 +2001,12 @@ public void testInvoices() throws Exception { recurlyClient.createAccountAdjustment(account.getAccountCode(), adjustmentData2); - final Adjustment adjustmentData3 = new Adjustment(); - adjustmentData3.setCurrency("USD"); - adjustmentData3.setUnitAmountInCents(50); - adjustmentData3.setDescription("A description of an account adjustment3"); - - recurlyClient.createAccountAdjustment(account.getAccountCode(), adjustmentData3); - final Invoice invoiceData = new Invoice(); invoiceData.setCollectionMethod("automatic"); final Invoice invoice = recurlyClient.postAccountInvoice(account.getAccountCode(), invoiceData).getChargeInvoice(); - Assert.assertEquals(invoice.getTotalInCents(), new Integer(250)); + Assert.assertEquals(invoice.getTotalInCents(), new Integer(200)); // wait for the invoice to be marked paid // has to happen asynchronously on the server @@ -2051,8 +2044,8 @@ public void testInvoices() throws Exception { refundOptions2.setPaymentMethod("credit_card"); final Invoice refundInvoice2 = recurlyClient.refundInvoice(invoice.getId(), refundOptions2); - Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-150)); - Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-150)); + Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-100)); + Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getTransactions().get(0).getAction(), "refund"); // The refundInvoice should have an original_invoices of the original invoice