Documentation ¶
Index ¶
- func ContainsExactly[T any](t *testing.T, arrayToCheck []T, elementsToCheck ...T)
- func WithSetUp[T TestData](data T, test func(data T))
- type MockHTTPClient
- func (m *MockHTTPClient) AddCognitoRequest(method, url, apiOp string, statusCode int, responseBody []byte)
- func (m *MockHTTPClient) AddRequest(method, url string, statusCode int, responseBody []byte)
- func (m *MockHTTPClient) CalledWithStatus(method, url string, expStatusCode int) bool
- func (m *MockHTTPClient) Do(req *http.Request) (*http.Response, error)
- func (m *MockHTTPClient) Get(url string) (resp *http.Response, err error)
- func (m *MockHTTPClient) GetCognitoRequestBody(method, url, serviceOp string) []byte
- func (m *MockHTTPClient) GetRequestBody(url string) []byte
- func (m *MockHTTPClient) GetRequestBodyByKey(method, url string) []byte
- func (m *MockHTTPClient) Post(url, _ string, body io.Reader) (resp *http.Response, err error)
- func (m *MockHTTPClient) VerifyCalled() bool
- type TestData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsExactly ¶
Types ¶
type MockHTTPClient ¶
type MockHTTPClient struct { mock.Mock Err error ResponseBody map[string][]byte RequestBody map[string][]byte Url string StatusCode int StatusCodes map[string]int Called map[string]int Auth string Authorizer *oauth2support.ResourceJwtAuthorizer Scopes []string }
func NewMockHTTPClient ¶
func NewMockHTTPClient() *MockHTTPClient
func NewMockHttpClientWithJwt ¶ added in v0.6.13
func (*MockHTTPClient) AddCognitoRequest ¶
func (m *MockHTTPClient) AddCognitoRequest(method, url, apiOp string, statusCode int, responseBody []byte)
func (*MockHTTPClient) AddRequest ¶
func (m *MockHTTPClient) AddRequest(method, url string, statusCode int, responseBody []byte)
func (*MockHTTPClient) CalledWithStatus ¶
func (m *MockHTTPClient) CalledWithStatus(method, url string, expStatusCode int) bool
func (*MockHTTPClient) Get ¶
func (m *MockHTTPClient) Get(url string) (resp *http.Response, err error)
func (*MockHTTPClient) GetCognitoRequestBody ¶
func (m *MockHTTPClient) GetCognitoRequestBody(method, url, serviceOp string) []byte
func (*MockHTTPClient) GetRequestBody ¶
func (m *MockHTTPClient) GetRequestBody(url string) []byte
func (*MockHTTPClient) GetRequestBodyByKey ¶
func (m *MockHTTPClient) GetRequestBodyByKey(method, url string) []byte
func (*MockHTTPClient) VerifyCalled ¶
func (m *MockHTTPClient) VerifyCalled() bool
Directories ¶
Path | Synopsis |
---|---|
Package tools provides utilities for tests.
|
Package tools provides utilities for tests. |
Click to show internal directories.
Click to hide internal directories.