Package net.officefloor.scalatest
Class ScalaMockWoofServerStaticAccess
- java.lang.Object
-
- net.officefloor.scalatest.ScalaMockWoofServerStaticAccess
-
public class ScalaMockWoofServerStaticAccess extends java.lang.Object
Provides access toMockWoofServer
static methods.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ScalaMockWoofServerStaticAccess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpMethod
httpMethod(java.lang.String methodName)
Obtains theHttpMethod
.java.lang.String
jsonEntity(java.lang.Object entity)
Translate entity object to JSON.MockHttpRequestBuilder
mockRequest()
ObtainsMockHttpRequestBuilder
for '/'.MockHttpRequestBuilder
mockRequest(java.lang.String requestUri)
ObtainsMockHttpRequestBuilder
.
-
-
-
Method Detail
-
mockRequest
public MockHttpRequestBuilder mockRequest()
ObtainsMockHttpRequestBuilder
for '/'.- Returns:
MockHttpRequestBuilder
.
-
mockRequest
public MockHttpRequestBuilder mockRequest(java.lang.String requestUri)
ObtainsMockHttpRequestBuilder
.- Parameters:
requestUri
- Request URI forMockHttpRequestBuilder
.- Returns:
MockHttpRequestBuilder
.
-
httpMethod
public HttpMethod httpMethod(java.lang.String methodName)
Obtains theHttpMethod
.- Parameters:
methodName
-HttpMethod
name.- Returns:
HttpMethod
.
-
jsonEntity
public java.lang.String jsonEntity(java.lang.Object entity) throws java.io.IOException
Translate entity object to JSON.- Parameters:
entity
- Entity.- Returns:
- JSON for entity.
- Throws:
java.io.IOException
- If fails to write object to JSON.
-
-