mocks

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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