Documentation ¶
Index ¶
- func RegisterAccountCommandContext(s *godog.Suite, db *sqlx.DB)
- func RegisterBankingCommandContext(s *godog.Suite, db *sqlx.DB)
- func RegisterCommandContext(s *godog.Suite)
- func RegisterCsvFileContext(s *godog.Suite, importPath string)
- func RegisterCurrencyConverterContext(s *godog.Suite, currencyConverterAPI *WireMock)
- func RegisterStockCommandContext(s *godog.Suite, db *sqlx.DB, yahooFinanceWeb, query1FinanceWeb *WireMock)
- type DBContext
- type Request
- type Response
- type WireMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCommandContext ¶
func RegisterCsvFileContext ¶
Types ¶
type Request ¶
type Request struct { Method string `json:"method"` URL string `json:"url"` Body string `json:"body,omitempty"` }
Request is the configuration to the request of a mock.
func NewWireMockRequest ¶
func NewWireMockRequest() *Request
NewWireMockRequest creates and returns a new request.
type Response ¶
type Response struct { Status int `json:"status"` Body string `json:"body"` Header map[string]string `json:"headers"` }
Response is the configuration to the Response of a mock.
func NewWireMockResponse ¶
func NewWireMockResponse() *Response
NewWireMockResponse creates and returns a new response.
func (*Response) SetJSONBody ¶
SetBodyJSON marshals an object into a JSON string, sets it as body and add a header in the response.
func (*Response) SetTextBody ¶
SetTextBody sets it as text body and add a header in the response.
type WireMock ¶
type WireMock struct { Response *Response `json:"response"` Request *Request `json:"request"` // contains filtered or unexported fields }
WireMock is a struct to interact with WireMock container.
func NewWireMock ¶
NewWireMock creates and returns a new WireMock.
func RegisterWireMockExtension ¶
RegisterWireMockExtension Register the WireMock management extension
func (*WireMock) SetWireMockRequest ¶
SetWireMockRequest adds a request to the object.
func (*WireMock) SetWireMockResponse ¶
SetWireMockResponse adds a response to the object.