use of com.github.mjeanroy.junit.servers.client.Cookie in project junit-servers by mjeanroy.
the class AbstractHttpResponseImplTest method it_get_given_cookie_and_return_null_without_cookie.
@Test
void it_get_given_cookie_and_return_null_without_cookie() {
final V response = createHttpResponseWithHeaders(givenCookieHeader());
final Cookie cookie = response.getCookie("fake_cookie");
assertThat(cookie).isNull();
}
use of com.github.mjeanroy.junit.servers.client.Cookie in project junit-servers by mjeanroy.
the class AbstractHttpResponseImplTest method it_get_given_cookie.
@Test
void it_get_given_cookie() {
final V response = createHttpResponseWithHeaders(givenCookieHeader());
final Cookie cookie = response.getCookie("ABT_force_signin_anonymous");
assertThat(cookie).isNotNull();
assertThat(cookie.getName()).isEqualTo("ABT_force_signin_anonymous");
assertThat(cookie.getValue()).isEqualTo("ON");
assertThat(cookie.getMaxAge()).isEqualTo(15552000L);
assertThat(cookie.getPath()).isEqualTo("/");
assertThat(cookie.getDomain()).isNull();
}
Aggregations