Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAsserter ¶
MockAsserter is the interface that needs to be fulfilled by the mocks that are passed in.
type Params ¶
type Params struct { Route string Method string Body interface{} Headers map[string]string PathParams []PathParam Query map[string]string Middleware []echo.MiddlewareFunc SleepBeforeAssert time.Duration }
Params contains all settings that should be used when calling the handler.
type Suite ¶
Suite holds the general properties to run handler tests.
func (*Suite) CallHandler ¶
func (s *Suite) CallHandler(t *testing.T, handlerFunc echo.HandlerFunc, params *Params, mocks []MockAsserter) (*httptest.ResponseRecorder, error)
CallHandler calls the given handler with the provided settings. Afterwards it calls "AssertExpectations" of the provided mocks.
Click to show internal directories.
Click to hide internal directories.