Documentation
¶
Index ¶
- Constants
- Variables
- func ErrUnsupportedMode(modeStr string) error
- type BaseMock
- func (m *BaseMock) GetCalledArgs(method string) []interface{}
- func (m *BaseMock) GetCountCallsFor(method string) uint
- func (m *BaseMock) IsMethodCalled(method string) bool
- func (m *BaseMock) IsNeverCalled() bool
- func (m *BaseMock) ProcessMethod(args ...interface{}) (interface{}, error)
- func (m *BaseMock) Reset()
- func (m *BaseMock) SetReturnsFor(methodName string, mockValue interface{})
- type InvokeFunc
- type Mode
- type ModeEnum
Constants ¶
View Source
const (
NoError = "no_error_mock_result"
)
Variables ¶
View Source
var ( ErrAssertMockResult = errors.New("an error occurred at asserting mock result") ErrCannotCastResult = errors.New("cannot cast expected mock result") ErrImplementMe = errors.New("unknown returnFor in mock. Need some result") ErrIllegalResultForMock = errors.New("illegal result for a mocked method") )
View Source
var Modes = ModeEnum{ // contains filtered or unexported fields }
View Source
var (
UnsupportedModeErrorCode = errors.ErrorCode("af6cbd01-001")
)
Functions ¶
func ErrUnsupportedMode ¶
Types ¶
type BaseMock ¶
type BaseMock struct {
// contains filtered or unexported fields
}
func NewBaseMock ¶
func (*BaseMock) GetCalledArgs ¶
func (*BaseMock) GetCountCallsFor ¶
func (*BaseMock) IsMethodCalled ¶
func (*BaseMock) IsNeverCalled ¶
func (*BaseMock) ProcessMethod ¶
func (*BaseMock) SetReturnsFor ¶
type InvokeFunc ¶
type InvokeFunc func(args ...interface{}) error
Click to show internal directories.
Click to hide internal directories.