|
14 | 14 | import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; |
15 | 15 | import static org.junit.jupiter.api.Assertions.assertEquals; |
16 | 16 | import static org.junit.jupiter.api.Assertions.assertNotNull; |
17 | | -import static org.junit.jupiter.api.Assertions.assertNull; |
18 | 17 | import static org.junit.jupiter.api.Assertions.assertTrue; |
19 | 18 |
|
20 | 19 | public final class BillingTest { |
@@ -139,30 +138,4 @@ public void testDeterminePaymentMethodTypeByObjectType() throws EasyPostExceptio |
139 | 138 | assertEquals("BankAccount", bankAccount.getObject()); |
140 | 139 | assertEquals(PaymentMethodObject.PaymentMethodType.BANK_ACCOUNT, bankAccount.getType()); |
141 | 140 | } |
142 | | - |
143 | | - /** |
144 | | - * Test determining a payment method type by its legacy prefix. |
145 | | - * |
146 | | - * @throws EasyPostException when the request fails. |
147 | | - */ |
148 | | - @Test |
149 | | - public void testDeterminePaymentMethodTypeByLegacyPrefix() throws EasyPostException { |
150 | | - requestMock.when(() -> Requestor.request( |
151 | | - RequestMethod.GET, "payment_methods", null, PaymentMethod.class, vcr.client)) |
152 | | - .thenReturn(paymentMethodLegacyPrefixes); |
153 | | - |
154 | | - // Should be a credit card with null object type and "card_" prefix |
155 | | - PaymentMethodObject creditCard = |
156 | | - vcr.client.billing.retrievePaymentMethods().getPrimaryPaymentMethod(); |
157 | | - assertTrue(creditCard.getId().startsWith("card_")); |
158 | | - assertNull(creditCard.getObject()); |
159 | | - assertEquals(PaymentMethodObject.PaymentMethodType.CREDIT_CARD, creditCard.getType()); |
160 | | - |
161 | | - // Should be a bank account with null object type and "bank_" prefix |
162 | | - PaymentMethodObject bankAccount = |
163 | | - vcr.client.billing.retrievePaymentMethods().getSecondaryPaymentMethod(); |
164 | | - assertTrue(bankAccount.getId().startsWith("bank_")); |
165 | | - assertNull(bankAccount.getObject()); |
166 | | - assertEquals(PaymentMethodObject.PaymentMethodType.BANK_ACCOUNT, bankAccount.getType()); |
167 | | - } |
168 | 141 | } |
0 commit comments