Documentation ¶
Index ¶
- func Marshal(t *testing.T, content interface{}) []byte
- func NewSUT(runFunc RunFunc, routables []routable.Contract) (context.CancelFunc, *sync.WaitGroup, *mux.Router)
- func SendRequestWithBody(t *testing.T, router *mux.Router, method string, url string, body []byte) *httptest.ResponseRecorder
- func SendRequestWithoutBody(t *testing.T, router *mux.Router, method, url string) *httptest.ResponseRecorder
- type RunFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSUT ¶
func NewSUT(runFunc RunFunc, routables []routable.Contract) (context.CancelFunc, *sync.WaitGroup, *mux.Router)
NewSUT returns a new system under test for acceptance testing.
func SendRequestWithBody ¶
func SendRequestWithBody( t *testing.T, router *mux.Router, method string, url string, body []byte) *httptest.ResponseRecorder
SendRequestWithBody is common implementation to create recorder, send a request, and return recorder for evaluation.
func SendRequestWithoutBody ¶
func SendRequestWithoutBody(t *testing.T, router *mux.Router, method, url string) *httptest.ResponseRecorder
SendRequestWithoutBody is common implementation to create recorder, send a request that has no body, and return recorder for evaluation.
Types ¶
Click to show internal directories.
Click to hide internal directories.