public void beginEmptyStrings(WebRequest theRequest) { theRequest.setURL("localhost:8080", null, null, TEST_URI, null); theRequest.addParameter("number", ""); theRequest.addParameter("date", ""); theRequest.addParameter("text", ""); theRequest.addParameter("hidden", ""); theRequest.addParameter("secret", ""); }
public void beginUserAgentNeedsUpdate2(WebRequest req) { long curTime = System.currentTimeMillis(), threeHoursAgo = curTime - 10800000L; facesService.setModificationTime("resources/duke-nv.gif", threeHoursAgo); facesService.setModificationTime("resources/nvLibrary/duke-nv.gif", threeHoursAgo); SimpleDateFormat format = new SimpleDateFormat(RFC1123_DATE_PATTERN, Locale.US); format.setTimeZone(GMT); Date headerValue = new Date(curTime); req.addHeader("If-Modified-Since", format.format(headerValue)); }
public void beginBadConversion(WebRequest theRequest) { theRequest.setURL("localhost:8080", null, null, TEST_URI, null); }
public void beginNulls(WebRequest theRequest) { theRequest.setURL("localhost:8080", null, null, TEST_URI, null); }
/** Create header for testParameterGreaterThan method test. */ public void beginParameterGreaterThan(WebRequest testRequest) { testRequest.addParameter(PARAMETER_KEY, GREATER_VAL); }
/** Create header for testHeaderGreaterThan method test. */ public void beginHeaderGreaterThan(WebRequest testRequest) { testRequest.addHeader(HEADER_KEY, GREATER_VAL); }
/** Create cookie for testCookieGreaterThan method test. */ public void beginCookieGreaterThan(WebRequest testRequest) { testRequest.addCookie(COOKIE_KEY, GREATER_VAL); }
public void beginUISelectMany(WebRequest theRequest) { // primitives theRequest.addParameter("bool", "false"); theRequest.addParameter("bool", "true"); theRequest.addParameter("bool", "false"); theRequest.addParameter("bool2", "false"); theRequest.addParameter("byte", Byte.toString(Byte.MIN_VALUE)); theRequest.addParameter("byte", Byte.toString(Byte.MAX_VALUE)); theRequest.addParameter("byte", "1"); theRequest.addParameter("char", "Q"); theRequest.addParameter("char", "A"); theRequest.addParameter("char", "z"); theRequest.addParameter("short", Short.toString(Short.MIN_VALUE)); theRequest.addParameter("short", Short.toString(Short.MAX_VALUE)); theRequest.addParameter("short", Short.toString((short) (Byte.MAX_VALUE + 1))); theRequest.addParameter("int", Integer.toString(Integer.MIN_VALUE)); theRequest.addParameter("int", Integer.toString(Integer.MAX_VALUE)); theRequest.addParameter("int", Integer.toString(Short.MAX_VALUE + 1)); theRequest.addParameter("float", Float.toString(Float.MIN_VALUE)); theRequest.addParameter("float", Float.toString(Float.MAX_VALUE)); theRequest.addParameter("float", Float.toString(Integer.MAX_VALUE + 1)); theRequest.addParameter("long", Long.toString(Long.MIN_VALUE)); theRequest.addParameter("long", Long.toString(Long.MAX_VALUE)); theRequest.addParameter("long", Long.toString(Integer.MAX_VALUE + 1)); theRequest.addParameter("double", Double.toString(Double.MIN_VALUE)); theRequest.addParameter("double", Double.toString(Double.MAX_VALUE)); theRequest.addParameter("double", Double.toString(Long.MAX_VALUE + 1)); // Objects theRequest.addParameter("str", "value1"); theRequest.addParameter("str", "value2"); theRequest.addParameter("str", "value3"); theRequest.addParameter("str2", ""); theRequest.addParameter("date", "Jan 1, 1967"); theRequest.addParameter("date", "May 26, 2003"); theRequest.addParameter("date", "Aug 19, 1946"); theRequest.addParameter("num", "12%"); theRequest.addParameter("num", "3.14"); theRequest.addParameter("num", "49.99"); theRequest.addParameter("stringList", "value1"); theRequest.addParameter("stringList", "value2"); theRequest.addParameter("stringList", "value3"); }
public void beginToURIExtensionMapping(WebRequest req) { req.setURL(localHostPath, "/test", "/foo.faces", null, null); }
public void beginToURIPrefixMapping(WebRequest req) { req.setURL(localHostPath, "/test", "/faces", "/foo.jsp", null); }
/** "level" precedence test - "text/html;level=1" is higher than "text/html" */ public void beginAccept3(WebRequest theRequest) { theRequest.addHeader("Accept", "text/plain; q=0.5, text/html, text/html;level=1"); }
/** quality test - "text/x-dvi" wins */ public void beginAccept2(WebRequest theRequest) { theRequest.addHeader("Accept", "text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c"); }
public void beginAccept6(WebRequest theRequest) { theRequest.addHeader("Accept", "text/html, application/xhtml+xml; q=0.5"); }
/** * A begin method for the isAuthenticatedNoSession method. This method will be executed on the * client-side and willset the automaticSession of the request to be false * * @param request */ public void beginIsAuthenticatedNoSession(WebRequest request) { request.setAutomaticSession(false); }