Search in sources :

Example 16 with SimpleRequestArguments

use of com.tvd12.ezyhttp.server.core.request.SimpleRequestArguments in project ezyhttp by youngmonkeys.

the class SimpleRequestArgumentsTest method setParameterMulti.

@Test
public void setParameterMulti() {
    // given
    SimpleRequestArguments sut = new SimpleRequestArguments();
    sut.setParameter("key", new String[] { "a", "b" });
    // when
    // then
    Asserts.assertEquals("a,b", sut.getParameter(0, "paramValue"));
    Asserts.assertEquals("a,b", sut.getParameter("key", "paramValue"));
    sut.release();
}
Also used : SimpleRequestArguments(com.tvd12.ezyhttp.server.core.request.SimpleRequestArguments) Test(org.testng.annotations.Test)

Aggregations

SimpleRequestArguments (com.tvd12.ezyhttp.server.core.request.SimpleRequestArguments)16 Test (org.testng.annotations.Test)15 Cookie (javax.servlet.http.Cookie)4 HttpServletResponse (javax.servlet.http.HttpServletResponse)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 AsyncContext (javax.servlet.AsyncContext)1 ServletInputStream (javax.servlet.ServletInputStream)1