Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExpression ¶
type CommandExpression struct {
// contains filtered or unexported fields
}
Represents an mocked expression against a dependent tool command
func (*CommandExpression) Respond ¶
func (e *CommandExpression) Respond(response exec.RunResult) *MockCommandRunner
Sets the response that will be returned for the current expression
func (*CommandExpression) RespondFn ¶
func (e *CommandExpression) RespondFn(responseFn ResponseFn) *MockCommandRunner
Sets the response that will be returned for the current expression
func (*CommandExpression) SetError ¶
func (e *CommandExpression) SetError(err error) *MockCommandRunner
Sets the error that will be returned for the current expression
type MockCommandRunner ¶
type MockCommandRunner struct {
// contains filtered or unexported fields
}
MockCommandRunner is used to register and implement mock calls and responses out to dependent CLI applications
func NewMockCommandRunner ¶
func NewMockCommandRunner() *MockCommandRunner
Creates a new instance of a mock exec
func (*MockCommandRunner) Run ¶
The Run definition that matches the real function definition This implementation will find the first matching, most recent mocked expression and return the configured response or error
func (*MockCommandRunner) When ¶
func (m *MockCommandRunner) When(predicate CommandWhenPredicate) *CommandExpression
Registers a mock expression against the mock exec