Search in sources :

Example 1 with StripeHeaders

use of com.stripe.net.StripeHeaders in project stripe-java by stripe.

the class StripeHeadersTest method testGet.

@Test
public void testGet() {
    StripeHeaders headers = new StripeHeaders(generateHeaderMap());
    assertEquals("req_12345", headers.get("Request-Id"));
    assertEquals("FirstValue", headers.get("Multi-Val"));
}
Also used : StripeHeaders(com.stripe.net.StripeHeaders) BaseStripeTest(com.stripe.BaseStripeTest) Test(org.junit.Test)

Example 2 with StripeHeaders

use of com.stripe.net.StripeHeaders in project stripe-java by stripe.

the class StripeHeadersTest method testValues.

@Test
public void testValues() {
    StripeHeaders headers = new StripeHeaders(generateHeaderMap());
    assertEquals(2, headers.values("Multi-Val").size());
    assertEquals("FirstValue", headers.values("Multi-Val").get(0));
    assertEquals("SecondValue", headers.values("Multi-Val").get(1));
}
Also used : StripeHeaders(com.stripe.net.StripeHeaders) BaseStripeTest(com.stripe.BaseStripeTest) Test(org.junit.Test)

Example 3 with StripeHeaders

use of com.stripe.net.StripeHeaders in project stripe-java by stripe.

the class StripeHeadersTest method testGetEmpty.

@Test
public void testGetEmpty() {
    StripeHeaders headers = new StripeHeaders(generateHeaderMap());
    assertEquals(null, headers.get("Empty-Header"));
}
Also used : StripeHeaders(com.stripe.net.StripeHeaders) BaseStripeTest(com.stripe.BaseStripeTest) Test(org.junit.Test)

Aggregations

BaseStripeTest (com.stripe.BaseStripeTest)3 StripeHeaders (com.stripe.net.StripeHeaders)3 Test (org.junit.Test)3