Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandlerTester ¶
func NewHandlerTester(t *testing.T, method string, path string, routerPath string, requestParams map[string]string, requestPayload string, requestHeaders map[string]string, responseStatus int, responseBody string, responseHeaders map[string]string, middleware ...echo.MiddlewareFunc, ) (*echo.Echo, echo.Context, *httptest.ResponseRecorder)
NewHandlerTester will help to build a temporary echo service which will mock the response we want to test the inventory client component. method indicate the http method to mock, such as "GET", "PUT", "DELETE" path the url path we need to mock. requestParams hashmap for the parameters value. body the payload string that we want to receive for the above request. Return an echo framework initialized and ready to start.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.