modeltesting

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockModel

type MockModel struct {
	mock.Mock
}

MockModel is an autogenerated mock type for the Model type

func NewMockModel

func NewMockModel(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockModel

NewMockModel creates a new instance of MockModel. 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 NewMockModelNamed

func NewMockModelNamed(t *testing.T, id string) *MockModel

NewMockModelNamed returns a new named mocked model.

func (*MockModel) GenerateTestsForFile

func (_m *MockModel) GenerateTestsForFile(logger *log.Logger, _a1 language.Language, repositoryPath string, filePath string) (metrics.Assessments, error)

GenerateTestsForFile provides a mock function with given fields: logger, _a1, repositoryPath, filePath

func (*MockModel) ID

func (_m *MockModel) ID() string

ID provides a mock function with given fields:

func (*MockModel) RegisterGenerateError

func (m *MockModel) RegisterGenerateError(err error) *mock.Call

RegisterGenerateError registers a mock call that errors on generation.

func (*MockModel) RegisterGenerateSuccess

func (m *MockModel) RegisterGenerateSuccess(t *testing.T, filePath string, fileContent string, assessment metrics.Assessments) *mock.Call

RegisterGenerateSuccess registers a mock call for successful generation.

Jump to

Keyboard shortcuts

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