org.apache.wink.test.mock
Class MockRequestConstructor

java.lang.Object
  extended by org.apache.wink.test.mock.MockRequestConstructor

public final class MockRequestConstructor
extends java.lang.Object

Constructs mock request for server testing


Method Summary
static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method, java.lang.String requestURI, javax.ws.rs.core.MediaType mediaType)
          Construct a mock request to be used in tests.
static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method, java.lang.String requestURI, java.lang.String acceptHeader)
          Construct a mock request to be used in tests.
static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method, java.lang.String requestURI, java.lang.String acceptHeader, java.util.Map<?,?> parameters, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Construct a mock request to be used in tests.
static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method, java.lang.String requestURI, java.lang.String acceptHeader, java.lang.String contentType, byte[] content)
          Construct a mock request to be used in tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

constructMockRequest

public static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method,
                                                                                       java.lang.String requestURI,
                                                                                       javax.ws.rs.core.MediaType mediaType)
Construct a mock request to be used in tests.

Parameters:
method - HTTP method
requestURI - request URI
mediaType - requested media type
Returns:
new mock request

constructMockRequest

public static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method,
                                                                                       java.lang.String requestURI,
                                                                                       java.lang.String acceptHeader)
Construct a mock request to be used in tests.

Parameters:
method - HTTP method
requestURI - request URI
acceptHeader - request Accept header
Returns:
new mock request

constructMockRequest

public static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method,
                                                                                       java.lang.String requestURI,
                                                                                       java.lang.String acceptHeader,
                                                                                       java.lang.String contentType,
                                                                                       byte[] content)
Construct a mock request to be used in tests.

Parameters:
method - HTTP method
requestURI - request URI
acceptHeader - request Accept header
contentType - request Content Type
content - request content
Returns:
new mock request

constructMockRequest

public static org.springframework.mock.web.MockHttpServletRequest constructMockRequest(java.lang.String method,
                                                                                       java.lang.String requestURI,
                                                                                       java.lang.String acceptHeader,
                                                                                       java.util.Map<?,?> parameters,
                                                                                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Construct a mock request to be used in tests.

Parameters:
method - HTTP method
requestURI - request URI
acceptHeader - request Accept header
parameters - request query parameters
attributes - request attributes
Returns:
new mock request


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.