Documentation ¶
Index ¶
- func AllEmpty(t assert.TestingT, in ...interface{}) bool
- func AllFalse(t assert.TestingT, in ...bool) bool
- func AllNotEmpty(t assert.TestingT, in ...interface{}) bool
- func AllTrue(t assert.TestingT, in ...bool) bool
- func NewTestHTTPClient(onRequest httpResponder) (httpClient *http.Client)
- func NewTestHTTPSequencedClient(onRequest ...httpResponder) (httpClient *http.Client)
- func TestNetPipe() (result net.Conn, responseChan chan []byte)
- type ErrReadCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllNotEmpty ¶
AllNotEmpty runs test for every item in the slice
func NewTestHTTPClient ¶
NewTestHTTPClient returns testing http client which responds with the provided response
tst.NewTestHTTPSequencedClient(func(request *http.request) *http.Response { ... })
func NewTestHTTPSequencedClient ¶
NewTestHTTPSequencedClient returns testing http client which responds with provided responses in sequence
tst.NewTestHTTPSequencedClient( func(request *http.Request) *http.Response { ... response 1 ... }, func(request *http.Request) *http.Response { ... response 2 ... } )
func TestNetPipe ¶
TestNetPipe returns net like pipe for testing
Types ¶
type ErrReadCloser ¶
type ErrReadCloser int
ErrReadCloser can be used for testing when reading from body in a request had failed
response = &http.Response{StatusCode: 200, Body: tst.ErrReadCloser(0), Header: make(http.Header)}
func (ErrReadCloser) Close ¶
func (e ErrReadCloser) Close() error
Close implements ReadCloser interface
Click to show internal directories.
Click to hide internal directories.