use of com.stripe.net.StripeResponse in project stripe-java by stripe.
the class StripeResponseTest method testHeaders.
@Test
public void testHeaders() {
Map<String, List<String>> headerMap = generateHeaderMap();
StripeResponse stripeResponse = new StripeResponse(200, chargeBody, headerMap);
assertThat(stripeResponse.headers(), instanceOf(StripeHeaders.class));
}
use of com.stripe.net.StripeResponse in project stripe-java by stripe.
the class StripeResponseTest method testBody.
@Test
public void testBody() {
StripeResponse stripeResponse = new StripeResponse(200, chargeBody);
assertEquals(200, stripeResponse.code());
assertEquals(chargeBody, stripeResponse.body());
}
use of com.stripe.net.StripeResponse in project stripe-java by stripe.
the class StripeResponseTest method testCode.
@Test
public void testCode() {
StripeResponse stripeResponse = new StripeResponse(200, chargeBody);
assertEquals(200, stripeResponse.code());
stripeResponse = new StripeResponse(201, chargeBody);
assertEquals(201, stripeResponse.code());
}
Aggregations