Documentation ¶
Index ¶
- Variables
- type Checker
- type MemoryStore
- type Spier
- type Spy
- func (mc Spy) Find(r definition.Request) []definition.Match
- func (mc Spy) Get(limit uint, offset uint) []definition.Match
- func (mc Spy) GetAll() []definition.Match
- func (mc Spy) GetMatched() []definition.Match
- func (mc Spy) GetUnMatched() []definition.Match
- func (mc Spy) Reset()
- func (mc Spy) ResetMatch(r definition.Request)
- func (mc Spy) Save(match definition.Match)
- type Store
- type Tester
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker interface {
Check(req *definition.Request, mock *definition.Mock, scenarioAware bool) (bool, error)
}
Checker checks if the received request matches with some specific mock request definition.
type MemoryStore ¶
MemoryStore stores all received request and their matches in memory until the last reset
func NewMemoryStore ¶
func NewMemoryStore(checker Checker) *MemoryStore
NewMemoryStore is the MemoryStore constructor
func (*MemoryStore) Get ¶
func (mrs *MemoryStore) Get(limit uint, offset uint) []definition.Match
Get return an subset of current matches (positive and negative) in memory
func (*MemoryStore) GetAll ¶
func (mrs *MemoryStore) GetAll() []definition.Match
GetAll return current matches (positive and negative) in memory
func (*MemoryStore) Reset ¶
func (mrs *MemoryStore) Reset()
Reset clean the request stored in memory
func (*MemoryStore) ResetMatch ¶
func (mrs *MemoryStore) ResetMatch(req definition.Request)
ResetMatch clean the request stored in memory that matches a particular criteria
func (*MemoryStore) Save ¶
func (mrs *MemoryStore) Save(req definition.Match)
Save store a match information
type Spier ¶
type Spier interface { Find(definition.Request) []definition.Match GetMatched() []definition.Match GetUnMatched() []definition.Match Store }
type Spy ¶
type Spy struct {
// contains filtered or unexported fields
}
func (Spy) Find ¶
func (mc Spy) Find(r definition.Request) []definition.Match
func (Spy) GetAll ¶
func (mc Spy) GetAll() []definition.Match
func (Spy) GetMatched ¶
func (mc Spy) GetMatched() []definition.Match
func (Spy) GetUnMatched ¶
func (mc Spy) GetUnMatched() []definition.Match
func (Spy) Save ¶
func (mc Spy) Save(match definition.Match)
type Store ¶
type Store interface { Save(definition.Match) Reset() ResetMatch(definition.Request) GetAll() []definition.Match Get(limit uint, offset uint) []definition.Match }
type Tester ¶
type Tester struct {
// contains filtered or unexported fields
}
func (Tester) Check ¶
func (mm Tester) Check(req *definition.Request, mock *definition.Mock, scenarioAware bool) (bool, error)
func (Tester) ValuesToString ¶
func (mm Tester) ValuesToString(values definition.Values) string
Click to show internal directories.
Click to hide internal directories.