// Code generated by mockery. DO NOT EDIT.
//go:build !release
package app
import (
context "context"
bitbucket "github.com/gemyago/atlacp/internal/services/bitbucket"
mock "github.com/stretchr/testify/mock"
time "time"
)
// MockbitbucketClient is an autogenerated mock type for the bitbucketClient type
type MockbitbucketClient struct {
mock.Mock
}
type MockbitbucketClient_Expecter struct {
mock *mock.Mock
}
func (_m *MockbitbucketClient) EXPECT() *MockbitbucketClient_Expecter {
return &MockbitbucketClient_Expecter{mock: &_m.Mock}
}
// AddPRComment provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) AddPRComment(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.AddPRCommentParams) (int64, string, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for AddPRComment")
}
var r0 int64
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.AddPRCommentParams) (int64, string, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.AddPRCommentParams) int64); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.AddPRCommentParams) string); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Get(1).(string)
}
if rf, ok := ret.Get(2).(func(context.Context, bitbucket.TokenProvider, bitbucket.AddPRCommentParams) error); ok {
r2 = rf(ctx, tokenProvider, params)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// MockbitbucketClient_AddPRComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddPRComment'
type MockbitbucketClient_AddPRComment_Call struct {
*mock.Call
}
// AddPRComment is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.AddPRCommentParams
func (_e *MockbitbucketClient_Expecter) AddPRComment(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_AddPRComment_Call {
return &MockbitbucketClient_AddPRComment_Call{Call: _e.mock.On("AddPRComment", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_AddPRComment_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.AddPRCommentParams)) *MockbitbucketClient_AddPRComment_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.AddPRCommentParams))
})
return _c
}
func (_c *MockbitbucketClient_AddPRComment_Call) Return(_a0 int64, _a1 string, _a2 error) *MockbitbucketClient_AddPRComment_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *MockbitbucketClient_AddPRComment_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.AddPRCommentParams) (int64, string, error)) *MockbitbucketClient_AddPRComment_Call {
_c.Call.Return(run)
return _c
}
// ApprovePR provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) ApprovePR(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.ApprovePRParams) (*bitbucket.Participant, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for ApprovePR")
}
var r0 *bitbucket.Participant
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.ApprovePRParams) (*bitbucket.Participant, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.ApprovePRParams) *bitbucket.Participant); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.Participant)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.ApprovePRParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_ApprovePR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApprovePR'
type MockbitbucketClient_ApprovePR_Call struct {
*mock.Call
}
// ApprovePR is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.ApprovePRParams
func (_e *MockbitbucketClient_Expecter) ApprovePR(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_ApprovePR_Call {
return &MockbitbucketClient_ApprovePR_Call{Call: _e.mock.On("ApprovePR", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_ApprovePR_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.ApprovePRParams)) *MockbitbucketClient_ApprovePR_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.ApprovePRParams))
})
return _c
}
func (_c *MockbitbucketClient_ApprovePR_Call) Return(_a0 *bitbucket.Participant, _a1 error) *MockbitbucketClient_ApprovePR_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_ApprovePR_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.ApprovePRParams) (*bitbucket.Participant, error)) *MockbitbucketClient_ApprovePR_Call {
_c.Call.Return(run)
return _c
}
// CreatePR provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) CreatePR(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.CreatePRParams) (*bitbucket.PullRequest, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for CreatePR")
}
var r0 *bitbucket.PullRequest
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePRParams) (*bitbucket.PullRequest, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePRParams) *bitbucket.PullRequest); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.PullRequest)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePRParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_CreatePR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePR'
type MockbitbucketClient_CreatePR_Call struct {
*mock.Call
}
// CreatePR is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.CreatePRParams
func (_e *MockbitbucketClient_Expecter) CreatePR(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_CreatePR_Call {
return &MockbitbucketClient_CreatePR_Call{Call: _e.mock.On("CreatePR", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_CreatePR_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.CreatePRParams)) *MockbitbucketClient_CreatePR_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.CreatePRParams))
})
return _c
}
func (_c *MockbitbucketClient_CreatePR_Call) Return(_a0 *bitbucket.PullRequest, _a1 error) *MockbitbucketClient_CreatePR_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_CreatePR_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePRParams) (*bitbucket.PullRequest, error)) *MockbitbucketClient_CreatePR_Call {
_c.Call.Return(run)
return _c
}
// CreatePullRequestTask provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) CreatePullRequestTask(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.CreatePullRequestTaskParams) (*bitbucket.PullRequestCommentTask, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for CreatePullRequestTask")
}
var r0 *bitbucket.PullRequestCommentTask
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePullRequestTaskParams) (*bitbucket.PullRequestCommentTask, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePullRequestTaskParams) *bitbucket.PullRequestCommentTask); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.PullRequestCommentTask)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePullRequestTaskParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_CreatePullRequestTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePullRequestTask'
type MockbitbucketClient_CreatePullRequestTask_Call struct {
*mock.Call
}
// CreatePullRequestTask is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.CreatePullRequestTaskParams
func (_e *MockbitbucketClient_Expecter) CreatePullRequestTask(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_CreatePullRequestTask_Call {
return &MockbitbucketClient_CreatePullRequestTask_Call{Call: _e.mock.On("CreatePullRequestTask", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_CreatePullRequestTask_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.CreatePullRequestTaskParams)) *MockbitbucketClient_CreatePullRequestTask_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.CreatePullRequestTaskParams))
})
return _c
}
func (_c *MockbitbucketClient_CreatePullRequestTask_Call) Return(_a0 *bitbucket.PullRequestCommentTask, _a1 error) *MockbitbucketClient_CreatePullRequestTask_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_CreatePullRequestTask_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.CreatePullRequestTaskParams) (*bitbucket.PullRequestCommentTask, error)) *MockbitbucketClient_CreatePullRequestTask_Call {
_c.Call.Return(run)
return _c
}
// GetFileContent provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) GetFileContent(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetFileContentParams) (*bitbucket.FileContent, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for GetFileContent")
}
var r0 *bitbucket.FileContent
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetFileContentParams) (*bitbucket.FileContent, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetFileContentParams) *bitbucket.FileContent); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.FileContent)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetFileContentParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_GetFileContent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFileContent'
type MockbitbucketClient_GetFileContent_Call struct {
*mock.Call
}
// GetFileContent is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.GetFileContentParams
func (_e *MockbitbucketClient_Expecter) GetFileContent(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_GetFileContent_Call {
return &MockbitbucketClient_GetFileContent_Call{Call: _e.mock.On("GetFileContent", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_GetFileContent_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetFileContentParams)) *MockbitbucketClient_GetFileContent_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.GetFileContentParams))
})
return _c
}
func (_c *MockbitbucketClient_GetFileContent_Call) Return(_a0 *bitbucket.FileContent, _a1 error) *MockbitbucketClient_GetFileContent_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_GetFileContent_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.GetFileContentParams) (*bitbucket.FileContent, error)) *MockbitbucketClient_GetFileContent_Call {
_c.Call.Return(run)
return _c
}
// GetPR provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) GetPR(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetPRParams) (*bitbucket.PullRequest, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for GetPR")
}
var r0 *bitbucket.PullRequest
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRParams) (*bitbucket.PullRequest, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRParams) *bitbucket.PullRequest); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.PullRequest)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_GetPR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPR'
type MockbitbucketClient_GetPR_Call struct {
*mock.Call
}
// GetPR is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.GetPRParams
func (_e *MockbitbucketClient_Expecter) GetPR(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_GetPR_Call {
return &MockbitbucketClient_GetPR_Call{Call: _e.mock.On("GetPR", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_GetPR_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetPRParams)) *MockbitbucketClient_GetPR_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.GetPRParams))
})
return _c
}
func (_c *MockbitbucketClient_GetPR_Call) Return(_a0 *bitbucket.PullRequest, _a1 error) *MockbitbucketClient_GetPR_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_GetPR_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRParams) (*bitbucket.PullRequest, error)) *MockbitbucketClient_GetPR_Call {
_c.Call.Return(run)
return _c
}
// GetPRDiff provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) GetPRDiff(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetPRDiffParams) (string, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for GetPRDiff")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffParams) (string, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffParams) string); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_GetPRDiff_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPRDiff'
type MockbitbucketClient_GetPRDiff_Call struct {
*mock.Call
}
// GetPRDiff is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.GetPRDiffParams
func (_e *MockbitbucketClient_Expecter) GetPRDiff(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_GetPRDiff_Call {
return &MockbitbucketClient_GetPRDiff_Call{Call: _e.mock.On("GetPRDiff", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_GetPRDiff_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetPRDiffParams)) *MockbitbucketClient_GetPRDiff_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.GetPRDiffParams))
})
return _c
}
func (_c *MockbitbucketClient_GetPRDiff_Call) Return(_a0 string, _a1 error) *MockbitbucketClient_GetPRDiff_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_GetPRDiff_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffParams) (string, error)) *MockbitbucketClient_GetPRDiff_Call {
_c.Call.Return(run)
return _c
}
// GetPRDiffStat provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) GetPRDiffStat(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetPRDiffStatParams) (*struct {
Size int `json:"size,omitempty"`
Page int `json:"page,omitempty"`
PageLen int `json:"pagelen,omitempty"`
Values []bitbucket.DiffStat `json:"values"`
}, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for GetPRDiffStat")
}
var r0 *struct {
Size int `json:"size,omitempty"`
Page int `json:"page,omitempty"`
PageLen int `json:"pagelen,omitempty"`
Values []bitbucket.DiffStat `json:"values"`
}
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffStatParams) (*struct {
Size int `json:"size,omitempty"`
Page int `json:"page,omitempty"`
PageLen int `json:"pagelen,omitempty"`
Values []bitbucket.DiffStat `json:"values"`
}, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffStatParams) *struct {
Size int `json:"size,omitempty"`
Page int `json:"page,omitempty"`
PageLen int `json:"pagelen,omitempty"`
Values []bitbucket.DiffStat `json:"values"`
}); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*struct {
Size int `json:"size,omitempty"`
Page int `json:"page,omitempty"`
PageLen int `json:"pagelen,omitempty"`
Values []bitbucket.DiffStat `json:"values"`
})
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffStatParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_GetPRDiffStat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPRDiffStat'
type MockbitbucketClient_GetPRDiffStat_Call struct {
*mock.Call
}
// GetPRDiffStat is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.GetPRDiffStatParams
func (_e *MockbitbucketClient_Expecter) GetPRDiffStat(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_GetPRDiffStat_Call {
return &MockbitbucketClient_GetPRDiffStat_Call{Call: _e.mock.On("GetPRDiffStat", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_GetPRDiffStat_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.GetPRDiffStatParams)) *MockbitbucketClient_GetPRDiffStat_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.GetPRDiffStatParams))
})
return _c
}
func (_c *MockbitbucketClient_GetPRDiffStat_Call) Return(_a0 *struct {
Size int `json:"size,omitempty"`
Page int `json:"page,omitempty"`
PageLen int `json:"pagelen,omitempty"`
Values []bitbucket.DiffStat `json:"values"`
}, _a1 error) *MockbitbucketClient_GetPRDiffStat_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_GetPRDiffStat_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.GetPRDiffStatParams) (*struct {
Size int `json:"size,omitempty"`
Page int `json:"page,omitempty"`
PageLen int `json:"pagelen,omitempty"`
Values []bitbucket.DiffStat `json:"values"`
}, error)) *MockbitbucketClient_GetPRDiffStat_Call {
_c.Call.Return(run)
return _c
}
// ListPRComments provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) ListPRComments(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.ListPRCommentsParams) (*bitbucket.ListPRCommentsResponse, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for ListPRComments")
}
var r0 *bitbucket.ListPRCommentsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.ListPRCommentsParams) (*bitbucket.ListPRCommentsResponse, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.ListPRCommentsParams) *bitbucket.ListPRCommentsResponse); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.ListPRCommentsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.ListPRCommentsParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_ListPRComments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPRComments'
type MockbitbucketClient_ListPRComments_Call struct {
*mock.Call
}
// ListPRComments is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.ListPRCommentsParams
func (_e *MockbitbucketClient_Expecter) ListPRComments(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_ListPRComments_Call {
return &MockbitbucketClient_ListPRComments_Call{Call: _e.mock.On("ListPRComments", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_ListPRComments_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.ListPRCommentsParams)) *MockbitbucketClient_ListPRComments_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.ListPRCommentsParams))
})
return _c
}
func (_c *MockbitbucketClient_ListPRComments_Call) Return(_a0 *bitbucket.ListPRCommentsResponse, _a1 error) *MockbitbucketClient_ListPRComments_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_ListPRComments_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.ListPRCommentsParams) (*bitbucket.ListPRCommentsResponse, error)) *MockbitbucketClient_ListPRComments_Call {
_c.Call.Return(run)
return _c
}
// ListPullRequestTasks provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) ListPullRequestTasks(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.ListPullRequestTasksParams) (*bitbucket.PaginatedTasks, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for ListPullRequestTasks")
}
var r0 *bitbucket.PaginatedTasks
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.ListPullRequestTasksParams) (*bitbucket.PaginatedTasks, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.ListPullRequestTasksParams) *bitbucket.PaginatedTasks); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.PaginatedTasks)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.ListPullRequestTasksParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_ListPullRequestTasks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPullRequestTasks'
type MockbitbucketClient_ListPullRequestTasks_Call struct {
*mock.Call
}
// ListPullRequestTasks is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.ListPullRequestTasksParams
func (_e *MockbitbucketClient_Expecter) ListPullRequestTasks(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_ListPullRequestTasks_Call {
return &MockbitbucketClient_ListPullRequestTasks_Call{Call: _e.mock.On("ListPullRequestTasks", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_ListPullRequestTasks_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.ListPullRequestTasksParams)) *MockbitbucketClient_ListPullRequestTasks_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.ListPullRequestTasksParams))
})
return _c
}
func (_c *MockbitbucketClient_ListPullRequestTasks_Call) Return(_a0 *bitbucket.PaginatedTasks, _a1 error) *MockbitbucketClient_ListPullRequestTasks_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_ListPullRequestTasks_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.ListPullRequestTasksParams) (*bitbucket.PaginatedTasks, error)) *MockbitbucketClient_ListPullRequestTasks_Call {
_c.Call.Return(run)
return _c
}
// MergePR provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) MergePR(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.MergePRParams) (*bitbucket.PullRequest, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for MergePR")
}
var r0 *bitbucket.PullRequest
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.MergePRParams) (*bitbucket.PullRequest, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.MergePRParams) *bitbucket.PullRequest); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.PullRequest)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.MergePRParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_MergePR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MergePR'
type MockbitbucketClient_MergePR_Call struct {
*mock.Call
}
// MergePR is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.MergePRParams
func (_e *MockbitbucketClient_Expecter) MergePR(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_MergePR_Call {
return &MockbitbucketClient_MergePR_Call{Call: _e.mock.On("MergePR", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_MergePR_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.MergePRParams)) *MockbitbucketClient_MergePR_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.MergePRParams))
})
return _c
}
func (_c *MockbitbucketClient_MergePR_Call) Return(_a0 *bitbucket.PullRequest, _a1 error) *MockbitbucketClient_MergePR_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_MergePR_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.MergePRParams) (*bitbucket.PullRequest, error)) *MockbitbucketClient_MergePR_Call {
_c.Call.Return(run)
return _c
}
// RequestPRChanges provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) RequestPRChanges(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.RequestPRChangesParams) (string, time.Time, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for RequestPRChanges")
}
var r0 string
var r1 time.Time
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.RequestPRChangesParams) (string, time.Time, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.RequestPRChangesParams) string); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.RequestPRChangesParams) time.Time); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Get(1).(time.Time)
}
if rf, ok := ret.Get(2).(func(context.Context, bitbucket.TokenProvider, bitbucket.RequestPRChangesParams) error); ok {
r2 = rf(ctx, tokenProvider, params)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// MockbitbucketClient_RequestPRChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestPRChanges'
type MockbitbucketClient_RequestPRChanges_Call struct {
*mock.Call
}
// RequestPRChanges is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.RequestPRChangesParams
func (_e *MockbitbucketClient_Expecter) RequestPRChanges(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_RequestPRChanges_Call {
return &MockbitbucketClient_RequestPRChanges_Call{Call: _e.mock.On("RequestPRChanges", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_RequestPRChanges_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.RequestPRChangesParams)) *MockbitbucketClient_RequestPRChanges_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.RequestPRChangesParams))
})
return _c
}
func (_c *MockbitbucketClient_RequestPRChanges_Call) Return(_a0 string, _a1 time.Time, _a2 error) *MockbitbucketClient_RequestPRChanges_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *MockbitbucketClient_RequestPRChanges_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.RequestPRChangesParams) (string, time.Time, error)) *MockbitbucketClient_RequestPRChanges_Call {
_c.Call.Return(run)
return _c
}
// UpdatePR provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) UpdatePR(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.UpdatePRParams) (*bitbucket.PullRequest, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for UpdatePR")
}
var r0 *bitbucket.PullRequest
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.UpdatePRParams) (*bitbucket.PullRequest, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.UpdatePRParams) *bitbucket.PullRequest); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.PullRequest)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.UpdatePRParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_UpdatePR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePR'
type MockbitbucketClient_UpdatePR_Call struct {
*mock.Call
}
// UpdatePR is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.UpdatePRParams
func (_e *MockbitbucketClient_Expecter) UpdatePR(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_UpdatePR_Call {
return &MockbitbucketClient_UpdatePR_Call{Call: _e.mock.On("UpdatePR", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_UpdatePR_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.UpdatePRParams)) *MockbitbucketClient_UpdatePR_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.UpdatePRParams))
})
return _c
}
func (_c *MockbitbucketClient_UpdatePR_Call) Return(_a0 *bitbucket.PullRequest, _a1 error) *MockbitbucketClient_UpdatePR_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_UpdatePR_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.UpdatePRParams) (*bitbucket.PullRequest, error)) *MockbitbucketClient_UpdatePR_Call {
_c.Call.Return(run)
return _c
}
// UpdateTask provides a mock function with given fields: ctx, tokenProvider, params
func (_m *MockbitbucketClient) UpdateTask(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.UpdateTaskParams) (*bitbucket.PullRequestCommentTask, error) {
ret := _m.Called(ctx, tokenProvider, params)
if len(ret) == 0 {
panic("no return value specified for UpdateTask")
}
var r0 *bitbucket.PullRequestCommentTask
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.UpdateTaskParams) (*bitbucket.PullRequestCommentTask, error)); ok {
return rf(ctx, tokenProvider, params)
}
if rf, ok := ret.Get(0).(func(context.Context, bitbucket.TokenProvider, bitbucket.UpdateTaskParams) *bitbucket.PullRequestCommentTask); ok {
r0 = rf(ctx, tokenProvider, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*bitbucket.PullRequestCommentTask)
}
}
if rf, ok := ret.Get(1).(func(context.Context, bitbucket.TokenProvider, bitbucket.UpdateTaskParams) error); ok {
r1 = rf(ctx, tokenProvider, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockbitbucketClient_UpdateTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTask'
type MockbitbucketClient_UpdateTask_Call struct {
*mock.Call
}
// UpdateTask is a helper method to define mock.On call
// - ctx context.Context
// - tokenProvider bitbucket.TokenProvider
// - params bitbucket.UpdateTaskParams
func (_e *MockbitbucketClient_Expecter) UpdateTask(ctx interface{}, tokenProvider interface{}, params interface{}) *MockbitbucketClient_UpdateTask_Call {
return &MockbitbucketClient_UpdateTask_Call{Call: _e.mock.On("UpdateTask", ctx, tokenProvider, params)}
}
func (_c *MockbitbucketClient_UpdateTask_Call) Run(run func(ctx context.Context, tokenProvider bitbucket.TokenProvider, params bitbucket.UpdateTaskParams)) *MockbitbucketClient_UpdateTask_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(bitbucket.TokenProvider), args[2].(bitbucket.UpdateTaskParams))
})
return _c
}
func (_c *MockbitbucketClient_UpdateTask_Call) Return(_a0 *bitbucket.PullRequestCommentTask, _a1 error) *MockbitbucketClient_UpdateTask_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockbitbucketClient_UpdateTask_Call) RunAndReturn(run func(context.Context, bitbucket.TokenProvider, bitbucket.UpdateTaskParams) (*bitbucket.PullRequestCommentTask, error)) *MockbitbucketClient_UpdateTask_Call {
_c.Call.Return(run)
return _c
}
// NewMockbitbucketClient creates a new instance of MockbitbucketClient. 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 NewMockbitbucketClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockbitbucketClient {
mock := &MockbitbucketClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}