mocks

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package mocks contains generated test doubles for Homebrew tap repository ports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepositoryReader

type MockRepositoryReader struct {
	mock.Mock
}

MockRepositoryReader is an autogenerated mock type for the RepositoryReader type

func NewMockRepositoryReader

func NewMockRepositoryReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRepositoryReader

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

func (*MockRepositoryReader) ReadBase

func (_mock *MockRepositoryReader) ReadBase(ctx context.Context, repository pubbrew.Repository, path pubbrew.FilePath) (pubbrew.BaseSnapshot, error)

ReadBase provides a mock function for the type MockRepositoryReader

func (*MockRepositoryReader) ReadBranch

ReadBranch provides a mock function for the type MockRepositoryReader

func (*MockRepositoryReader) ReadPullRequest

func (_mock *MockRepositoryReader) ReadPullRequest(ctx context.Context, repository pubbrew.Repository, base pubbrew.BranchName, head pubbrew.BranchName) (pubbrew.PullRequest, error)

ReadPullRequest provides a mock function for the type MockRepositoryReader

type MockRepositoryReader_Expecter

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

func (*MockRepositoryReader_Expecter) ReadBase

func (_e *MockRepositoryReader_Expecter) ReadBase(ctx any, repository any, path any) *MockRepositoryReader_ReadBase_Call

ReadBase is a helper method to define mock.On call

  • ctx context.Context
  • repository pubbrew.Repository
  • path pubbrew.FilePath

func (*MockRepositoryReader_Expecter) ReadBranch

func (_e *MockRepositoryReader_Expecter) ReadBranch(ctx any, repository any, branch any, path any) *MockRepositoryReader_ReadBranch_Call

ReadBranch is a helper method to define mock.On call

  • ctx context.Context
  • repository pubbrew.Repository
  • branch pubbrew.BranchName
  • path pubbrew.FilePath

func (*MockRepositoryReader_Expecter) ReadPullRequest

func (_e *MockRepositoryReader_Expecter) ReadPullRequest(ctx any, repository any, base any, head any) *MockRepositoryReader_ReadPullRequest_Call

ReadPullRequest is a helper method to define mock.On call

  • ctx context.Context
  • repository pubbrew.Repository
  • base pubbrew.BranchName
  • head pubbrew.BranchName

type MockRepositoryReader_ReadBase_Call

type MockRepositoryReader_ReadBase_Call struct {
	*mock.Call
}

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

func (*MockRepositoryReader_ReadBase_Call) Return

func (*MockRepositoryReader_ReadBase_Call) Run

func (*MockRepositoryReader_ReadBase_Call) RunAndReturn

type MockRepositoryReader_ReadBranch_Call

type MockRepositoryReader_ReadBranch_Call struct {
	*mock.Call
}

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

func (*MockRepositoryReader_ReadBranch_Call) Return

func (*MockRepositoryReader_ReadBranch_Call) Run

func (*MockRepositoryReader_ReadBranch_Call) RunAndReturn

type MockRepositoryReader_ReadPullRequest_Call

type MockRepositoryReader_ReadPullRequest_Call struct {
	*mock.Call
}

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

func (*MockRepositoryReader_ReadPullRequest_Call) Return

func (*MockRepositoryReader_ReadPullRequest_Call) Run

func (*MockRepositoryReader_ReadPullRequest_Call) RunAndReturn

type MockRepositoryWriter

type MockRepositoryWriter struct {
	mock.Mock
}

MockRepositoryWriter is an autogenerated mock type for the RepositoryWriter type

func NewMockRepositoryWriter

func NewMockRepositoryWriter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRepositoryWriter

NewMockRepositoryWriter creates a new instance of MockRepositoryWriter. 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 (*MockRepositoryWriter) CreateBranch

func (_mock *MockRepositoryWriter) CreateBranch(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, from pubbrew.CommitSHA) error

CreateBranch provides a mock function for the type MockRepositoryWriter

func (*MockRepositoryWriter) CreatePullRequest

func (_mock *MockRepositoryWriter) CreatePullRequest(ctx context.Context, repository pubbrew.Repository, input pubbrew.PullRequestInput) (string, error)

CreatePullRequest provides a mock function for the type MockRepositoryWriter

func (*MockRepositoryWriter) EXPECT

func (*MockRepositoryWriter) PutFile

func (_mock *MockRepositoryWriter) PutFile(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, path pubbrew.FilePath, previous pubbrew.BlobSHA, content []byte, message string) error

PutFile provides a mock function for the type MockRepositoryWriter

type MockRepositoryWriter_CreateBranch_Call

type MockRepositoryWriter_CreateBranch_Call struct {
	*mock.Call
}

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

func (*MockRepositoryWriter_CreateBranch_Call) Return

func (*MockRepositoryWriter_CreateBranch_Call) Run

func (*MockRepositoryWriter_CreateBranch_Call) RunAndReturn

type MockRepositoryWriter_CreatePullRequest_Call

type MockRepositoryWriter_CreatePullRequest_Call struct {
	*mock.Call
}

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

func (*MockRepositoryWriter_CreatePullRequest_Call) Return

func (*MockRepositoryWriter_CreatePullRequest_Call) Run

func (*MockRepositoryWriter_CreatePullRequest_Call) RunAndReturn

type MockRepositoryWriter_Expecter

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

func (*MockRepositoryWriter_Expecter) CreateBranch

func (_e *MockRepositoryWriter_Expecter) CreateBranch(ctx any, repository any, branch any, from any) *MockRepositoryWriter_CreateBranch_Call

CreateBranch is a helper method to define mock.On call

  • ctx context.Context
  • repository pubbrew.Repository
  • branch pubbrew.BranchName
  • from pubbrew.CommitSHA

func (*MockRepositoryWriter_Expecter) CreatePullRequest

func (_e *MockRepositoryWriter_Expecter) CreatePullRequest(ctx any, repository any, input any) *MockRepositoryWriter_CreatePullRequest_Call

CreatePullRequest is a helper method to define mock.On call

  • ctx context.Context
  • repository pubbrew.Repository
  • input pubbrew.PullRequestInput

func (*MockRepositoryWriter_Expecter) PutFile

func (_e *MockRepositoryWriter_Expecter) PutFile(ctx any, repository any, branch any, path any, previous any, content any, message any) *MockRepositoryWriter_PutFile_Call

PutFile is a helper method to define mock.On call

  • ctx context.Context
  • repository pubbrew.Repository
  • branch pubbrew.BranchName
  • path pubbrew.FilePath
  • previous pubbrew.BlobSHA
  • content []byte
  • message string

type MockRepositoryWriter_PutFile_Call

type MockRepositoryWriter_PutFile_Call struct {
	*mock.Call
}

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

func (*MockRepositoryWriter_PutFile_Call) Return

func (*MockRepositoryWriter_PutFile_Call) Run

func (_c *MockRepositoryWriter_PutFile_Call) Run(run func(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, path pubbrew.FilePath, previous pubbrew.BlobSHA, content []byte, message string)) *MockRepositoryWriter_PutFile_Call

func (*MockRepositoryWriter_PutFile_Call) RunAndReturn

func (_c *MockRepositoryWriter_PutFile_Call) RunAndReturn(run func(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, path pubbrew.FilePath, previous pubbrew.BlobSHA, content []byte, message string) error) *MockRepositoryWriter_PutFile_Call

Jump to

Keyboard shortcuts

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