Documentation ¶
Index ¶
- type HTTPMockService
- func (ms *HTTPMockService) ClearInteractions()
- func (ms *HTTPMockService) GetRegisteredInteractions() []*Interaction
- func (ms *HTTPMockService) IsTestScopeClear() bool
- func (ms *HTTPMockService) RegisterInteraction(interaction *Interaction) error
- func (ms *HTTPMockService) Start() string
- func (ms *HTTPMockService) Stop()
- func (ms *HTTPMockService) VerifyInteractions() error
- type Interaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPMockService ¶
type HTTPMockService struct {
// contains filtered or unexported fields
}
func NewHTTPMockService ¶
func NewHTTPMockService() *HTTPMockService
func (*HTTPMockService) ClearInteractions ¶
func (ms *HTTPMockService) ClearInteractions()
func (*HTTPMockService) GetRegisteredInteractions ¶
func (ms *HTTPMockService) GetRegisteredInteractions() []*Interaction
func (*HTTPMockService) IsTestScopeClear ¶
func (ms *HTTPMockService) IsTestScopeClear() bool
func (*HTTPMockService) RegisterInteraction ¶
func (ms *HTTPMockService) RegisterInteraction(interaction *Interaction) error
func (*HTTPMockService) Start ¶
func (ms *HTTPMockService) Start() string
func (*HTTPMockService) Stop ¶
func (ms *HTTPMockService) Stop()
func (*HTTPMockService) VerifyInteractions ¶
func (ms *HTTPMockService) VerifyInteractions() error
VerifyInteractions - Verfies if the registered interactions has been requested and verified
type Interaction ¶
type Interaction struct { State string `json:"provider_state,omitempty"` Description string `json:"description"` Request *provider.Request `json:"request"` Response *provider.Response `json:"response"` }
func NewInteraction ¶
func (*Interaction) IsSimilar ¶
func (i *Interaction) IsSimilar(to *Interaction) bool
func (*Interaction) ToHTTPRequest ¶
func (i *Interaction) ToHTTPRequest(baseURL string) (*http.Request, error)
func (*Interaction) WriteToHTTPResponse ¶
func (i *Interaction) WriteToHTTPResponse(w http.ResponseWriter) error
Click to show internal directories.
Click to hide internal directories.