Search in sources :

Example 1 with CustomerCollection

use of com.stripe.model.CustomerCollection in project stripe-java by stripe.

the class StripeResponseTest method testResponseIncludedList.

@Test
public void testResponseIncludedList() throws AuthenticationException, InvalidRequestException, APIException, APIConnectionException, CardException {
    CustomerCollection cusCollection = Customer.list(new HashMap<String, Object>());
    StripeResponse resp = cusCollection.getLastResponse();
    assertThat(resp, instanceOf(StripeResponse.class));
    assertEquals(200, resp.code());
    assertTrue(resp.requestId().startsWith("req_"));
    assertTrue(resp.body().length() > 0);
}
Also used : CustomerCollection(com.stripe.model.CustomerCollection) StripeResponse(com.stripe.net.StripeResponse) BaseStripeFunctionalTest(com.stripe.BaseStripeFunctionalTest) Test(org.junit.Test)

Aggregations

BaseStripeFunctionalTest (com.stripe.BaseStripeFunctionalTest)1 CustomerCollection (com.stripe.model.CustomerCollection)1 StripeResponse (com.stripe.net.StripeResponse)1 Test (org.junit.Test)1