Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct { Calls [][]interface{} // contains filtered or unexported fields }
If the function being mocked returns a func, that function will be nil
func MockFunc ¶
func MockFunc(funcAddress interface{}) *Mock
Mock the function at the specified address.
By default the function will return zero values.
func (*Mock) GetArgsForCall ¶
Returns the args for the n'th call to the mocked function
func (*Mock) Restore ¶
func (self *Mock) Restore()
Restore the original behaviour of the function that was being mocked.
func (*Mock) SetReturnFunc ¶
func (self *Mock) SetReturnFunc(function interface{})
Replace the mocked function with the provided one. Panics if the given function signature does not match the original one.
func (*Mock) SetReturns ¶
func (self *Mock) SetReturns(returns ...interface{})
Set what the mocked function should return. Panic if the number of return values doesn't match the original function, or if the types don't match
Click to show internal directories.
Click to hide internal directories.