Documentation
¶
Index ¶
- type HTTPFixture
- func (this *HTTPFixture) AssertInternalServerError()
- func (this *HTTPFixture) AssertJSONResponse(expectedStatus int, expectedBody interface{})
- func (this *HTTPFixture) DeserializeJSONResponseBody() (actual interface{})
- func (this *HTTPFixture) SerializeJSONRequestBody(body interface{})
- func (this *HTTPFixture) Serve(handler http.Handler)
- func (this *HTTPFixture) SetQueryStringParameter(key, value string)
- func (this *HTTPFixture) SetRequestContextValue(key, value interface{})
- func (this *HTTPFixture) Teardown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPFixture ¶
type HTTPFixture struct {
*gunit.Fixture
RequestMethod string
RequestURL url.URL
RequestBody string
RequestHeaders http.Header
RequestContext context.Context
Response *http.Response
ResponseBody string
Dump *bytes.Buffer
}
func NewHTTPFixture ¶
func NewHTTPFixture(inner *gunit.Fixture) *HTTPFixture
func (*HTTPFixture) AssertInternalServerError ¶
func (this *HTTPFixture) AssertInternalServerError()
func (*HTTPFixture) AssertJSONResponse ¶
func (this *HTTPFixture) AssertJSONResponse(expectedStatus int, expectedBody interface{})
func (*HTTPFixture) DeserializeJSONResponseBody ¶
func (this *HTTPFixture) DeserializeJSONResponseBody() (actual interface{})
func (*HTTPFixture) SerializeJSONRequestBody ¶
func (this *HTTPFixture) SerializeJSONRequestBody(body interface{})
func (*HTTPFixture) Serve ¶
func (this *HTTPFixture) Serve(handler http.Handler)
func (*HTTPFixture) SetQueryStringParameter ¶
func (this *HTTPFixture) SetQueryStringParameter(key, value string)
func (*HTTPFixture) SetRequestContextValue ¶
func (this *HTTPFixture) SetRequestContextValue(key, value interface{})
func (*HTTPFixture) Teardown ¶
func (this *HTTPFixture) Teardown()
Click to show internal directories.
Click to hide internal directories.