Documentation ¶
Overview ¶
Package mocks provides mock implementations for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockEnvironment ¶
type MockEnvironment struct { mock.Mock env.Environment }
MockEnvironment is a struct that implements the Environment interface from the env package. It uses the testify/mock package to create mock implementations of the Environment methods.
func (*MockEnvironment) Getenv ¶
func (m *MockEnvironment) Getenv(key string) string
Getenv is a method on the MockEnvironment struct that mocks the Getenv method of the Environment interface. It uses the Called method from the testify/mock package to simulate the method call and return the mocked results.
type MockFileSystem ¶
type MockFileSystem struct { mock.Mock fs.FileSystem }
MockFileSystem is a struct that implements the FileSystem interface from the fs package. It uses the testify/mock package to create mock implementations of the FileSystem methods.
func (*MockFileSystem) MkdirAll ¶
func (m *MockFileSystem) MkdirAll(path string, perm stdfs.FileMode) error
MkdirAll is a method on the MockFileSystem struct that mocks the MkdirAll method of the FileSystem interface. It uses the Called method from the testify/mock package to simulate the method call and return the mocked results.
func (*MockFileSystem) UserHomeDir ¶
func (m *MockFileSystem) UserHomeDir() (string, error)
UserHomeDir is a method on the MockFileSystem struct that mocks the UserHomeDir method of the FileSystem interface. It uses the Called method from the testify/mock package to simulate the method call and return the mocked results.