mocks

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Os

type Os struct {
	mock.Mock
}

Os is an autogenerated mock type for the Os type

func NewOs

func NewOs(t interface {
	mock.TestingT
	Cleanup(func())
}) *Os

NewOs creates a new instance of Os. 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 (*Os) EXPECT

func (_m *Os) EXPECT() *Os_Expecter

func (*Os) Lstat

func (_m *Os) Lstat(name string) (fs.FileInfo, error)

Lstat provides a mock function with given fields: name

func (*Os) ReadFile

func (_m *Os) ReadFile(name string) ([]byte, error)

ReadFile provides a mock function with given fields: name

func (*Os) Remove

func (_m *Os) Remove(name string) error

Remove provides a mock function with given fields: name

func (*Os) Stat

func (_m *Os) Stat(name string) (fs.FileInfo, error)

Stat provides a mock function with given fields: name

func (*Os) WriteFile

func (_m *Os) WriteFile(name string, data []byte, perm fs.FileMode, opts ...renameio.Option) error

WriteFile provides a mock function with given fields: name, data, perm, opts

type Os_Expecter

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

func (*Os_Expecter) Lstat

func (_e *Os_Expecter) Lstat(name interface{}) *Os_Lstat_Call

Lstat is a helper method to define mock.On call

  • name string

func (*Os_Expecter) ReadFile

func (_e *Os_Expecter) ReadFile(name interface{}) *Os_ReadFile_Call

ReadFile is a helper method to define mock.On call

  • name string

func (*Os_Expecter) Remove

func (_e *Os_Expecter) Remove(name interface{}) *Os_Remove_Call

Remove is a helper method to define mock.On call

  • name string

func (*Os_Expecter) Stat

func (_e *Os_Expecter) Stat(name interface{}) *Os_Stat_Call

Stat is a helper method to define mock.On call

  • name string

func (*Os_Expecter) WriteFile

func (_e *Os_Expecter) WriteFile(name interface{}, data interface{}, perm interface{}, opts ...interface{}) *Os_WriteFile_Call

WriteFile is a helper method to define mock.On call

  • name string
  • data []byte
  • perm fs.FileMode
  • opts ...renameio.Option

type Os_Lstat_Call

type Os_Lstat_Call struct {
	*mock.Call
}

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

func (*Os_Lstat_Call) Return

func (_c *Os_Lstat_Call) Return(_a0 fs.FileInfo, _a1 error) *Os_Lstat_Call

func (*Os_Lstat_Call) Run

func (_c *Os_Lstat_Call) Run(run func(name string)) *Os_Lstat_Call

func (*Os_Lstat_Call) RunAndReturn

func (_c *Os_Lstat_Call) RunAndReturn(run func(string) (fs.FileInfo, error)) *Os_Lstat_Call

type Os_ReadFile_Call

type Os_ReadFile_Call struct {
	*mock.Call
}

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

func (*Os_ReadFile_Call) Return

func (_c *Os_ReadFile_Call) Return(_a0 []byte, _a1 error) *Os_ReadFile_Call

func (*Os_ReadFile_Call) Run

func (_c *Os_ReadFile_Call) Run(run func(name string)) *Os_ReadFile_Call

func (*Os_ReadFile_Call) RunAndReturn

func (_c *Os_ReadFile_Call) RunAndReturn(run func(string) ([]byte, error)) *Os_ReadFile_Call

type Os_Remove_Call

type Os_Remove_Call struct {
	*mock.Call
}

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

func (*Os_Remove_Call) Return

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

func (*Os_Remove_Call) Run

func (_c *Os_Remove_Call) Run(run func(name string)) *Os_Remove_Call

func (*Os_Remove_Call) RunAndReturn

func (_c *Os_Remove_Call) RunAndReturn(run func(string) error) *Os_Remove_Call

type Os_Stat_Call

type Os_Stat_Call struct {
	*mock.Call
}

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

func (*Os_Stat_Call) Return

func (_c *Os_Stat_Call) Return(_a0 fs.FileInfo, _a1 error) *Os_Stat_Call

func (*Os_Stat_Call) Run

func (_c *Os_Stat_Call) Run(run func(name string)) *Os_Stat_Call

func (*Os_Stat_Call) RunAndReturn

func (_c *Os_Stat_Call) RunAndReturn(run func(string) (fs.FileInfo, error)) *Os_Stat_Call

type Os_WriteFile_Call

type Os_WriteFile_Call struct {
	*mock.Call
}

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

func (*Os_WriteFile_Call) Return

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

func (*Os_WriteFile_Call) Run

func (_c *Os_WriteFile_Call) Run(run func(name string, data []byte, perm fs.FileMode, opts ...renameio.Option)) *Os_WriteFile_Call

func (*Os_WriteFile_Call) RunAndReturn

func (_c *Os_WriteFile_Call) RunAndReturn(run func(string, []byte, fs.FileMode, ...renameio.Option) error) *Os_WriteFile_Call

Jump to

Keyboard shortcuts

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