mocks

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeathersUseCase added in v1.3.2

type FeathersUseCase struct {
	mock.Mock
}

FeathersUseCase is an autogenerated mock type for the FeathersUseCase type

func NewFeathersUseCase added in v1.3.2

func NewFeathersUseCase(t mockConstructorTestingTNewFeathersUseCase) *FeathersUseCase

NewFeathersUseCase creates a new instance of FeathersUseCase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*FeathersUseCase) GetFeathersFromBytes added in v1.3.2

func (_m *FeathersUseCase) GetFeathersFromBytes(data []byte) (*models.Feathers, error)

GetFeathersFromBytes provides a mock function with given fields: data

func (*FeathersUseCase) GetFeathersFromFile added in v1.3.2

func (_m *FeathersUseCase) GetFeathersFromFile() (*models.Feathers, error)

GetFeathersFromFile provides a mock function with given fields:

func (*FeathersUseCase) ValidateFeathers added in v1.3.2

func (_m *FeathersUseCase) ValidateFeathers(f *models.Feathers) error

ValidateFeathers provides a mock function with given fields: f

type FileUseCase added in v1.0.0

type FileUseCase struct {
	mock.Mock
}

FileUseCase is an autogenerated mock type for the FileUseCase type

func NewFileUseCase added in v1.0.0

func NewFileUseCase(t mockConstructorTestingTNewFileUseCase) *FileUseCase

NewFileUseCase creates a new instance of FileUseCase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*FileUseCase) Exists added in v1.0.0

func (_m *FileUseCase) Exists(path string) (bool, error)

Exists provides a mock function with given fields: path

func (*FileUseCase) Mkdir added in v1.0.0

func (_m *FileUseCase) Mkdir(path string) error

Mkdir provides a mock function with given fields: path

func (*FileUseCase) Read added in v1.0.0

func (_m *FileUseCase) Read(fileName string) ([]byte, error)

Read provides a mock function with given fields: fileName

func (*FileUseCase) Remove added in v1.0.0

func (_m *FileUseCase) Remove(path string) error

Remove provides a mock function with given fields: path

func (*FileUseCase) Write added in v1.0.0

func (_m *FileUseCase) Write(data []byte, path string) error

Write provides a mock function with given fields: data, path

type Git

type Git struct {
	mock.Mock
}

Git is an autogenerated mock type for the Git type

func NewGit

func NewGit(t mockConstructorTestingTNewGit) *Git

NewGit creates a new instance of Git. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Git) GetLatestCommitSHA added in v0.10.3

func (_m *Git) GetLatestCommitSHA(dir string) (string, error)

GetLatestCommitSHA provides a mock function with given fields: dir

func (*Git) GetRepoOwnerAndName added in v0.10.3

func (_m *Git) GetRepoOwnerAndName(dir string) (string, string, error)

GetRepoOwnerAndName provides a mock function with given fields: dir

type MessageClient added in v1.0.0

type MessageClient struct {
	mock.Mock
}

MessageClient is an autogenerated mock type for the MessageClient type

func NewMessageClient added in v1.0.0

func NewMessageClient(t mockConstructorTestingTNewMessageClient) *MessageClient

NewMessageClient creates a new instance of MessageClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MessageClient) Send added in v1.0.0

func (_m *MessageClient) Send(content string, subject string, addresses []string) error

Send provides a mock function with given fields: content, subject, addresses

type MessageHandler

type MessageHandler struct {
	mock.Mock
}

MessageHandler is an autogenerated mock type for the MessageHandler type

func NewMessageHandler

func NewMessageHandler(t mockConstructorTestingTNewMessageHandler) *MessageHandler

NewMessageHandler creates a new instance of MessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MessageHandler) IsInitialised added in v1.0.0

func (_m *MessageHandler) IsInitialised(contactType string) bool

IsInitialised provides a mock function with given fields: contactType

func (*MessageHandler) SendReleaseNotes added in v1.1.1

func (_m *MessageHandler) SendReleaseNotes(subject string, notes []models.ReleaseNote) error

SendReleaseNotes provides a mock function with given fields: subject, notes

type ReleaseNotesUseCase added in v1.1.1

type ReleaseNotesUseCase struct {
	mock.Mock
}

ReleaseNotesUseCase is an autogenerated mock type for the ReleaseNotesUseCase type

func NewReleaseNotesUseCase added in v1.1.1

func NewReleaseNotesUseCase(t mockConstructorTestingTNewReleaseNotesUseCase) *ReleaseNotesUseCase

NewReleaseNotesUseCase creates a new instance of ReleaseNotesUseCase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ReleaseNotesUseCase) GenerateBreakdown added in v1.1.1

func (_m *ReleaseNotesUseCase) GenerateBreakdown(notes []models.ReleaseNote, hash string, totalTeams int) (string, error)

GenerateBreakdown provides a mock function with given fields: notes, hash, totalTeams

func (*ReleaseNotesUseCase) GenerateHash added in v1.1.1

func (_m *ReleaseNotesUseCase) GenerateHash(messages []models.ReleaseNote) (string, error)

GenerateHash provides a mock function with given fields: messages

func (*ReleaseNotesUseCase) GetReleaseNotesFromMDAndTeams added in v1.3.2

func (_m *ReleaseNotesUseCase) GetReleaseNotesFromMDAndTeams(markdown string, teamsInFeathers models.Teams) ([]models.ReleaseNote, error)

GetReleaseNotesFromMDAndTeams provides a mock function with given fields: markdown, teamsInFeathers

func (*ReleaseNotesUseCase) SendReleaseNotes added in v1.1.1

func (_m *ReleaseNotesUseCase) SendReleaseNotes(subject string, notes []models.ReleaseNote) error

SendReleaseNotes provides a mock function with given fields: subject, notes

type SCM added in v1.0.0

type SCM struct {
	mock.Mock
}

SCM is an autogenerated mock type for the SCM type

func NewSCM added in v1.0.0

func NewSCM(t mockConstructorTestingTNewSCM) *SCM

NewSCM creates a new instance of SCM. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SCM) CommentError added in v1.0.0

func (_m *SCM) CommentError(ctx context.Context, owner string, repoName string, prNumber int, prOwner string, err error) error

CommentError provides a mock function with given fields: ctx, owner, repoName, prNumber, prOwner, err

func (*SCM) CommentOnPR added in v1.0.0

func (_m *SCM) CommentOnPR(ctx context.Context, owner string, repoName string, prNumber int, body string) error

CommentOnPR provides a mock function with given fields: ctx, owner, repoName, prNumber, body

func (*SCM) CreatePeacockCommitStatus added in v1.0.0

func (_m *SCM) CreatePeacockCommitStatus(ctx context.Context, owner string, repoName string, ref string, state domain.State, statusContext string) error

CreatePeacockCommitStatus provides a mock function with given fields: ctx, owner, repoName, ref, state, statusContext

func (*SCM) DeleteUsersComments added in v1.0.0

func (_m *SCM) DeleteUsersComments(ctx context.Context, owner string, repoName string, prNumber int) error

DeleteUsersComments provides a mock function with given fields: ctx, owner, repoName, prNumber

func (*SCM) GetFileFromBranch added in v1.0.0

func (_m *SCM) GetFileFromBranch(ctx context.Context, owner string, repoName string, branch string, path string) ([]byte, error)

GetFileFromBranch provides a mock function with given fields: ctx, owner, repoName, branch, path

func (*SCM) GetLatestCommitSHAInBranch added in v1.0.0

func (_m *SCM) GetLatestCommitSHAInBranch(ctx context.Context, owner string, repoName string, branch string) (string, error)

GetLatestCommitSHAInBranch provides a mock function with given fields: ctx, owner, repoName, branch

func (*SCM) GetPRComments added in v1.0.0

func (_m *SCM) GetPRComments(ctx context.Context, owner string, repoName string, prNumber int) ([]*github.IssueComment, error)

GetPRComments provides a mock function with given fields: ctx, owner, repoName, prNumber

func (*SCM) GetPRCommentsByUser added in v1.0.0

func (_m *SCM) GetPRCommentsByUser(ctx context.Context, owner string, repoName string, prNumber int) ([]*github.IssueComment, error)

GetPRCommentsByUser provides a mock function with given fields: ctx, owner, repoName, prNumber

func (*SCM) GetPullRequestBodyFromCommit added in v1.0.0

func (_m *SCM) GetPullRequestBodyFromCommit(ctx context.Context, owner string, repoName string, sha string) (*string, error)

GetPullRequestBodyFromCommit provides a mock function with given fields: ctx, owner, repoName, sha

func (*SCM) GetPullRequestBodyFromPRNumber added in v1.0.0

func (_m *SCM) GetPullRequestBodyFromPRNumber(ctx context.Context, owner string, repoName string, prNumber int) (*string, error)

GetPullRequestBodyFromPRNumber provides a mock function with given fields: ctx, owner, repoName, prNumber

func (*SCM) HandleError added in v1.0.0

func (_m *SCM) HandleError(ctx context.Context, statusContext string, owner string, repoName string, prNumber int, headSHA string, prOwner string, err error) error

HandleError provides a mock function with given fields: ctx, statusContext, owner, repoName, prNumber, headSHA, prOwner, err

type SCMClientFactory added in v1.0.0

type SCMClientFactory struct {
	mock.Mock
}

SCMClientFactory is an autogenerated mock type for the SCMClientFactory type

func NewSCMClientFactory added in v1.0.0

func NewSCMClientFactory(t mockConstructorTestingTNewSCMClientFactory) *SCMClientFactory

NewSCMClientFactory creates a new instance of SCMClientFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SCMClientFactory) GetClient added in v1.0.0

func (_m *SCMClientFactory) GetClient(owner string, repo string, user string, prNumber int) domain.SCM

GetClient provides a mock function with given fields: owner, repo, user, prNumber

func (*SCMClientFactory) RemoveClient added in v1.0.0

func (_m *SCMClientFactory) RemoveClient(key string)

RemoveClient provides a mock function with given fields: key

Jump to

Keyboard shortcuts

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