Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpMockResJSON ¶
func StringToTime ¶
StringToTime return string to time without return error. If when parsing encounters an error, it will return the default value
Types ¶
type Mocks ¶
type Mocks struct {
Api *mock_request.MockApi
}
type TestWrapper ¶
type TestWrapper struct { Ctrl *gomock.Controller ServerKey string }
func NewTestWrapper ¶
func NewTestWrapper(t *testing.T) *TestWrapper
func (*TestWrapper) DeepEqualPayload ¶
func (w *TestWrapper) DeepEqualPayload(fileJson string, payload any, argPayload any) bool
DeepEqualPayload checks whether the payload for the request matches the example json or not. Value payload and argPayload must be assign as pointer
func (*TestWrapper) DeepEqualResponse ¶
func (w *TestWrapper) DeepEqualResponse(gotRes any, wantRes any) bool
DeepEqualResponse is used to check responses that have interface values
func (*TestWrapper) ResJSONByte ¶
func (w *TestWrapper) ResJSONByte(jsonFile string) []byte
ResJSONByte is used for convert file json to []byte
Click to show internal directories.
Click to hide internal directories.