use of io.vertx.core.http.impl.CookieImpl in project java-chassis by ServiceComb.
the class CookieItemTest method serverFormattedElementOnNotFound.
@Test
public void serverFormattedElementOnNotFound() {
HashMap<String, Cookie> cookieSet = new HashMap<>();
CookieImpl cookie = new CookieImpl("anotherCookieName", COOKIE_VALUE);
cookieSet.put(cookie.getName(), cookie);
Mockito.when(mockContext.cookieCount()).thenReturn(1);
Mockito.when(mockContext.cookieMap()).thenReturn(cookieSet);
accessLogEvent.setRoutingContext(mockContext);
ELEMENT.appendServerFormattedItem(accessLogEvent, strBuilder);
Assert.assertEquals("-", strBuilder.toString());
}
use of io.vertx.core.http.impl.CookieImpl in project java-chassis by ServiceComb.
the class CookieItemTest method serverFormattedElement.
@Test
public void serverFormattedElement() {
HashMap<String, Cookie> cookieSet = new HashMap<>();
CookieImpl cookie = new CookieImpl(COOKIE_NAME, COOKIE_VALUE);
cookieSet.put(cookie.getName(), cookie);
when(mockContext.cookieCount()).thenReturn(1);
when(mockContext.cookieMap()).thenReturn(cookieSet);
accessLogEvent.setRoutingContext(mockContext);
ELEMENT.appendServerFormattedItem(accessLogEvent, strBuilder);
Assert.assertEquals(COOKIE_VALUE, strBuilder.toString());
}
use of io.vertx.core.http.impl.CookieImpl in project incubator-servicecomb-java-chassis by apache.
the class CookieItemTest method serverFormattedElementOnNotFound.
@Test
public void serverFormattedElementOnNotFound() {
HashMap<String, Cookie> cookieSet = new HashMap<>();
CookieImpl cookie = new CookieImpl("anotherCookieName", COOKIE_VALUE);
cookieSet.put(cookie.getName(), cookie);
Mockito.when(mockContext.cookieCount()).thenReturn(1);
Mockito.when(mockContext.cookieMap()).thenReturn(cookieSet);
accessLogEvent.setRoutingContext(mockContext);
ELEMENT.appendServerFormattedItem(accessLogEvent, strBuilder);
Assert.assertEquals("-", strBuilder.toString());
}
use of io.vertx.core.http.impl.CookieImpl in project incubator-servicecomb-java-chassis by apache.
the class CookieItemTest method serverFormattedElement.
@Test
public void serverFormattedElement() {
HashMap<String, Cookie> cookieSet = new HashMap<>();
CookieImpl cookie = new CookieImpl(COOKIE_NAME, COOKIE_VALUE);
cookieSet.put(cookie.getName(), cookie);
when(mockContext.cookieCount()).thenReturn(1);
when(mockContext.cookieMap()).thenReturn(cookieSet);
accessLogEvent.setRoutingContext(mockContext);
ELEMENT.appendServerFormattedItem(accessLogEvent, strBuilder);
Assert.assertEquals(COOKIE_VALUE, strBuilder.toString());
}
Aggregations