mocks

package
v1.1.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompt

type Prompt struct {
	mock.Mock
}

Prompt is an autogenerated mock type for the Prompt type

func NewPrompt

func NewPrompt(t interface {
	mock.TestingT
	Cleanup(func())
}) *Prompt

NewPrompt creates a new instance of Prompt. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Prompt) Confirm

func (_m *Prompt) Confirm(message string, options ...func(*prompt.ConfirmOptions)) (bool, error)

Confirm provides a mock function with given fields: message, options

func (*Prompt) EXPECT

func (_m *Prompt) EXPECT() *Prompt_Expecter

func (*Prompt) Newline added in v1.0.44

func (_m *Prompt) Newline(count ...int) error

Newline provides a mock function with given fields: count

func (*Prompt) Print added in v1.0.44

func (_m *Prompt) Print(text string, options ...func(*prompt.PrintOptions)) error

Print provides a mock function with given fields: text, options

type Prompt_Confirm_Call

type Prompt_Confirm_Call struct {
	*mock.Call
}

Prompt_Confirm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirm'

func (*Prompt_Confirm_Call) Return

func (_c *Prompt_Confirm_Call) Return(_a0 bool, _a1 error) *Prompt_Confirm_Call

func (*Prompt_Confirm_Call) Run

func (_c *Prompt_Confirm_Call) Run(run func(message string, options ...func(*prompt.ConfirmOptions))) *Prompt_Confirm_Call

func (*Prompt_Confirm_Call) RunAndReturn added in v1.0.73

func (_c *Prompt_Confirm_Call) RunAndReturn(run func(string, ...func(*prompt.ConfirmOptions)) (bool, error)) *Prompt_Confirm_Call

type Prompt_Expecter

type Prompt_Expecter struct {
	// contains filtered or unexported fields
}

func (*Prompt_Expecter) Confirm

func (_e *Prompt_Expecter) Confirm(message interface{}, options ...interface{}) *Prompt_Confirm_Call

Confirm is a helper method to define mock.On call

  • message string
  • options ...func(*prompt.ConfirmOptions)

func (*Prompt_Expecter) Newline added in v1.0.44

func (_e *Prompt_Expecter) Newline(count ...interface{}) *Prompt_Newline_Call

Newline is a helper method to define mock.On call

  • count ...int

func (*Prompt_Expecter) Print added in v1.0.44

func (_e *Prompt_Expecter) Print(text interface{}, options ...interface{}) *Prompt_Print_Call

Print is a helper method to define mock.On call

  • text string
  • options ...func(*prompt.PrintOptions)

type Prompt_Newline_Call added in v1.0.44

type Prompt_Newline_Call struct {
	*mock.Call
}

Prompt_Newline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Newline'

func (*Prompt_Newline_Call) Return added in v1.0.44

func (*Prompt_Newline_Call) Run added in v1.0.44

func (_c *Prompt_Newline_Call) Run(run func(count ...int)) *Prompt_Newline_Call

func (*Prompt_Newline_Call) RunAndReturn added in v1.0.73

func (_c *Prompt_Newline_Call) RunAndReturn(run func(...int) error) *Prompt_Newline_Call

type Prompt_Print_Call added in v1.0.44

type Prompt_Print_Call struct {
	*mock.Call
}

Prompt_Print_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Print'

func (*Prompt_Print_Call) Return added in v1.0.44

func (_c *Prompt_Print_Call) Return(_a0 error) *Prompt_Print_Call

func (*Prompt_Print_Call) Run added in v1.0.44

func (_c *Prompt_Print_Call) Run(run func(text string, options ...func(*prompt.PrintOptions))) *Prompt_Print_Call

func (*Prompt_Print_Call) RunAndReturn added in v1.0.73

func (_c *Prompt_Print_Call) RunAndReturn(run func(string, ...func(*prompt.PrintOptions)) error) *Prompt_Print_Call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL