Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RequestMatcher ¶
func RequestBodyMatcher ¶
func RequestBodyMatcher(expectedBody string) RequestMatcher
func RequestBodyMatcherWithContentType ¶
func RequestBodyMatcherWithContentType(expectedBody, expectedContentType string) RequestMatcher
type TestHandler ¶
type TestHandler struct { Requests []TestRequest CallCount int T *testing.T }
func NewTLSServer ¶
func NewTLSServer(t *testing.T, requests []TestRequest) (s *httptest.Server, h *TestHandler)
func (*TestHandler) AllRequestsCalled ¶
func (h *TestHandler) AllRequestsCalled() bool
func (*TestHandler) ServeHTTP ¶
func (h *TestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TestRequest ¶
type TestRequest struct { Method string Path string Header http.Header Matcher RequestMatcher Response TestResponse }
Click to show internal directories.
Click to hide internal directories.