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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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