Documentation
¶
Index ¶
- type MockRegistry
- func (r *MockRegistry) FindHTTPMock(url string, method string) (*types.ExpectStatement, bool)
- func (r *MockRegistry) FindHTTPMockWithHeaders(url string, method string, headers map[string]string) (*types.ExpectStatement, bool)
- func (r *MockRegistry) FindMock(key string, query string) (*types.ExpectStatement, bool)
- func (r *MockRegistry) GetHits() map[string]int
- func (r *MockRegistry) GetTables() []string
- func (r *MockRegistry) LoadFromFile(path string) error
- func (r *MockRegistry) PeekMock(key string, query string) (*types.ExpectStatement, bool)
- func (r *MockRegistry) Register(spec *types.TestSpec)
- func (r *MockRegistry) ResetHits()
- func (r *MockRegistry) SaveToFile(path string) error
- func (r *MockRegistry) SetHits(hostHits map[string]int)
- func (r *MockRegistry) VerifyAll() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRegistry ¶
func NewMockRegistry ¶
func NewMockRegistry() *MockRegistry
func (*MockRegistry) FindHTTPMock ¶
func (r *MockRegistry) FindHTTPMock(url string, method string) (*types.ExpectStatement, bool)
FindHTTPMock finds an HTTP mock matching both URL and method
func (*MockRegistry) FindHTTPMockWithHeaders ¶
func (r *MockRegistry) FindHTTPMockWithHeaders(url string, method string, headers map[string]string) (*types.ExpectStatement, bool)
FindHTTPMockWithHeaders finds an HTTP mock matching URL, method, and headers
func (*MockRegistry) FindMock ¶
func (r *MockRegistry) FindMock(key string, query string) (*types.ExpectStatement, bool)
func (*MockRegistry) GetHits ¶
func (r *MockRegistry) GetHits() map[string]int
func (*MockRegistry) GetTables ¶
func (r *MockRegistry) GetTables() []string
GetTables returns a list of unique table names registered in the registry
func (*MockRegistry) LoadFromFile ¶
func (r *MockRegistry) LoadFromFile(path string) error
func (*MockRegistry) PeekMock ¶
func (r *MockRegistry) PeekMock(key string, query string) (*types.ExpectStatement, bool)
PeekMock checks if a mock exists without incrementing hit count (used for testing intercept)
func (*MockRegistry) Register ¶
func (r *MockRegistry) Register(spec *types.TestSpec)
func (*MockRegistry) ResetHits ¶
func (r *MockRegistry) ResetHits()
ResetHits resets the hit count for all mocks (useful for testing)
func (*MockRegistry) SaveToFile ¶
func (r *MockRegistry) SaveToFile(path string) error
func (*MockRegistry) SetHits ¶
func (r *MockRegistry) SetHits(hostHits map[string]int)
func (*MockRegistry) VerifyAll ¶
func (r *MockRegistry) VerifyAll() error
Click to show internal directories.
Click to hide internal directories.