Documentation
¶
Overview ¶
Package mocks contains generated test doubles for Homebrew tap repository ports.
Index ¶
- type MockRepositoryReader
- func (_m *MockRepositoryReader) EXPECT() *MockRepositoryReader_Expecter
- func (_mock *MockRepositoryReader) ReadBase(ctx context.Context, repository pubbrew.Repository, path pubbrew.FilePath) (pubbrew.BaseSnapshot, error)
- func (_mock *MockRepositoryReader) ReadBranch(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, ...) (pubbrew.BranchSnapshot, error)
- func (_mock *MockRepositoryReader) ReadPullRequest(ctx context.Context, repository pubbrew.Repository, base pubbrew.BranchName, ...) (pubbrew.PullRequest, error)
- type MockRepositoryReader_Expecter
- func (_e *MockRepositoryReader_Expecter) ReadBase(ctx any, repository any, path any) *MockRepositoryReader_ReadBase_Call
- func (_e *MockRepositoryReader_Expecter) ReadBranch(ctx any, repository any, branch any, path any) *MockRepositoryReader_ReadBranch_Call
- func (_e *MockRepositoryReader_Expecter) ReadPullRequest(ctx any, repository any, base any, head any) *MockRepositoryReader_ReadPullRequest_Call
- type MockRepositoryReader_ReadBase_Call
- func (_c *MockRepositoryReader_ReadBase_Call) Return(baseSnapshot pubbrew.BaseSnapshot, err error) *MockRepositoryReader_ReadBase_Call
- func (_c *MockRepositoryReader_ReadBase_Call) Run(...) *MockRepositoryReader_ReadBase_Call
- func (_c *MockRepositoryReader_ReadBase_Call) RunAndReturn(...) *MockRepositoryReader_ReadBase_Call
- type MockRepositoryReader_ReadBranch_Call
- func (_c *MockRepositoryReader_ReadBranch_Call) Return(branchSnapshot pubbrew.BranchSnapshot, err error) *MockRepositoryReader_ReadBranch_Call
- func (_c *MockRepositoryReader_ReadBranch_Call) Run(...) *MockRepositoryReader_ReadBranch_Call
- func (_c *MockRepositoryReader_ReadBranch_Call) RunAndReturn(...) *MockRepositoryReader_ReadBranch_Call
- type MockRepositoryReader_ReadPullRequest_Call
- func (_c *MockRepositoryReader_ReadPullRequest_Call) Return(pullRequest pubbrew.PullRequest, err error) *MockRepositoryReader_ReadPullRequest_Call
- func (_c *MockRepositoryReader_ReadPullRequest_Call) Run(...) *MockRepositoryReader_ReadPullRequest_Call
- func (_c *MockRepositoryReader_ReadPullRequest_Call) RunAndReturn(...) *MockRepositoryReader_ReadPullRequest_Call
- type MockRepositoryWriter
- func (_mock *MockRepositoryWriter) CreateBranch(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, ...) error
- func (_mock *MockRepositoryWriter) CreatePullRequest(ctx context.Context, repository pubbrew.Repository, ...) (string, error)
- func (_m *MockRepositoryWriter) EXPECT() *MockRepositoryWriter_Expecter
- func (_mock *MockRepositoryWriter) PutFile(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, ...) error
- type MockRepositoryWriter_CreateBranch_Call
- func (_c *MockRepositoryWriter_CreateBranch_Call) Return(err error) *MockRepositoryWriter_CreateBranch_Call
- func (_c *MockRepositoryWriter_CreateBranch_Call) Run(...) *MockRepositoryWriter_CreateBranch_Call
- func (_c *MockRepositoryWriter_CreateBranch_Call) RunAndReturn(...) *MockRepositoryWriter_CreateBranch_Call
- type MockRepositoryWriter_CreatePullRequest_Call
- func (_c *MockRepositoryWriter_CreatePullRequest_Call) Return(s string, err error) *MockRepositoryWriter_CreatePullRequest_Call
- func (_c *MockRepositoryWriter_CreatePullRequest_Call) Run(run func(ctx context.Context, repository pubbrew.Repository, ...)) *MockRepositoryWriter_CreatePullRequest_Call
- func (_c *MockRepositoryWriter_CreatePullRequest_Call) RunAndReturn(...) *MockRepositoryWriter_CreatePullRequest_Call
- type MockRepositoryWriter_Expecter
- func (_e *MockRepositoryWriter_Expecter) CreateBranch(ctx any, repository any, branch any, from any) *MockRepositoryWriter_CreateBranch_Call
- func (_e *MockRepositoryWriter_Expecter) CreatePullRequest(ctx any, repository any, input any) *MockRepositoryWriter_CreatePullRequest_Call
- func (_e *MockRepositoryWriter_Expecter) PutFile(ctx any, repository any, branch any, path any, previous any, content any, ...) *MockRepositoryWriter_PutFile_Call
- type MockRepositoryWriter_PutFile_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRepositoryReader ¶
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 (_m *MockRepositoryReader) EXPECT() *MockRepositoryReader_Expecter
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 ¶
func (_mock *MockRepositoryReader) ReadBranch(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, path pubbrew.FilePath) (pubbrew.BranchSnapshot, error)
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 ¶
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 (_c *MockRepositoryReader_ReadBase_Call) Return(baseSnapshot pubbrew.BaseSnapshot, err error) *MockRepositoryReader_ReadBase_Call
func (*MockRepositoryReader_ReadBase_Call) Run ¶
func (_c *MockRepositoryReader_ReadBase_Call) Run(run func(ctx context.Context, repository pubbrew.Repository, path pubbrew.FilePath)) *MockRepositoryReader_ReadBase_Call
func (*MockRepositoryReader_ReadBase_Call) RunAndReturn ¶
func (_c *MockRepositoryReader_ReadBase_Call) RunAndReturn(run func(ctx context.Context, repository pubbrew.Repository, path pubbrew.FilePath) (pubbrew.BaseSnapshot, error)) *MockRepositoryReader_ReadBase_Call
type MockRepositoryReader_ReadBranch_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 (_c *MockRepositoryReader_ReadBranch_Call) Return(branchSnapshot pubbrew.BranchSnapshot, err error) *MockRepositoryReader_ReadBranch_Call
func (*MockRepositoryReader_ReadBranch_Call) Run ¶
func (_c *MockRepositoryReader_ReadBranch_Call) Run(run func(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, path pubbrew.FilePath)) *MockRepositoryReader_ReadBranch_Call
func (*MockRepositoryReader_ReadBranch_Call) RunAndReturn ¶
func (_c *MockRepositoryReader_ReadBranch_Call) RunAndReturn(run func(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, path pubbrew.FilePath) (pubbrew.BranchSnapshot, error)) *MockRepositoryReader_ReadBranch_Call
type MockRepositoryReader_ReadPullRequest_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 (_c *MockRepositoryReader_ReadPullRequest_Call) Return(pullRequest pubbrew.PullRequest, err error) *MockRepositoryReader_ReadPullRequest_Call
func (*MockRepositoryReader_ReadPullRequest_Call) Run ¶
func (_c *MockRepositoryReader_ReadPullRequest_Call) Run(run func(ctx context.Context, repository pubbrew.Repository, base pubbrew.BranchName, head pubbrew.BranchName)) *MockRepositoryReader_ReadPullRequest_Call
func (*MockRepositoryReader_ReadPullRequest_Call) RunAndReturn ¶
func (_c *MockRepositoryReader_ReadPullRequest_Call) RunAndReturn(run func(ctx context.Context, repository pubbrew.Repository, base pubbrew.BranchName, head pubbrew.BranchName) (pubbrew.PullRequest, error)) *MockRepositoryReader_ReadPullRequest_Call
type MockRepositoryWriter ¶
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 (_m *MockRepositoryWriter) EXPECT() *MockRepositoryWriter_Expecter
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 ¶
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 (_c *MockRepositoryWriter_CreateBranch_Call) Return(err error) *MockRepositoryWriter_CreateBranch_Call
func (*MockRepositoryWriter_CreateBranch_Call) Run ¶
func (_c *MockRepositoryWriter_CreateBranch_Call) Run(run func(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, from pubbrew.CommitSHA)) *MockRepositoryWriter_CreateBranch_Call
func (*MockRepositoryWriter_CreateBranch_Call) RunAndReturn ¶
func (_c *MockRepositoryWriter_CreateBranch_Call) RunAndReturn(run func(ctx context.Context, repository pubbrew.Repository, branch pubbrew.BranchName, from pubbrew.CommitSHA) error) *MockRepositoryWriter_CreateBranch_Call
type MockRepositoryWriter_CreatePullRequest_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 (_c *MockRepositoryWriter_CreatePullRequest_Call) Return(s string, err error) *MockRepositoryWriter_CreatePullRequest_Call
func (*MockRepositoryWriter_CreatePullRequest_Call) Run ¶
func (_c *MockRepositoryWriter_CreatePullRequest_Call) Run(run func(ctx context.Context, repository pubbrew.Repository, input pubbrew.PullRequestInput)) *MockRepositoryWriter_CreatePullRequest_Call
func (*MockRepositoryWriter_CreatePullRequest_Call) RunAndReturn ¶
func (_c *MockRepositoryWriter_CreatePullRequest_Call) RunAndReturn(run func(ctx context.Context, repository pubbrew.Repository, input pubbrew.PullRequestInput) (string, error)) *MockRepositoryWriter_CreatePullRequest_Call
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 ¶
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 (_c *MockRepositoryWriter_PutFile_Call) Return(err error) *MockRepositoryWriter_PutFile_Call
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