Documentation
¶
Index ¶
- Constants
- func AssertHttpStatus(t *testing.T) func(rr *httptest.ResponseRecorder, want int)
- func GenerateSignature(secret, body string) string
- func InitRoutesTest()
- func NewMockHttpClient(mockRespCode int, callbacks ...Callback) *http.Client
- type Callback
- type MockService
- type MockServiceInterface
- type RoutesTestSuite
Constants ¶
View Source
const StubSecret = "some-line-channel-secret"
Variables ¶
This section is empty.
Functions ¶
func AssertHttpStatus ¶
func AssertHttpStatus(t *testing.T) func(rr *httptest.ResponseRecorder, want int)
func GenerateSignature ¶
Types ¶
type MockService ¶
type MockService[T any] struct { // contains filtered or unexported fields }
func (*MockService[T]) CalledTimes ¶
func (s *MockService[T]) CalledTimes() int
func (*MockService[T]) Execute ¶
func (s *MockService[T]) Execute(dto *T) error
type MockServiceInterface ¶
func NewMockService ¶
func NewMockService[T any](shouldFail bool, errs ...error) MockServiceInterface[T]
type RoutesTestSuite ¶
type RoutesTestSuite struct { Router *gin.Engine ServiceContext *s.ServiceContext }
func NewRoutesTestSuite ¶
func NewRoutesTestSuite() *RoutesTestSuite
Click to show internal directories.
Click to hide internal directories.