| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. | |
| package mocks | |
| import ( | |
| context "context" | |
| code_review "go.skia.org/infra/golden/go/code_review" | |
| mock "github.com/stretchr/testify/mock" | |
| vcsinfo "go.skia.org/infra/go/vcsinfo" | |
| ) | |
| // Client is an autogenerated mock type for the Client type | |
| type Client struct { | |
| mock.Mock | |
| } | |
| // CommentOn provides a mock function with given fields: ctx, clID, message | |
| func (_m *Client) CommentOn(ctx context.Context, clID string, message string) error { | |
| ret := _m.Called(ctx, clID, message) | |
| if len(ret) == 0 { | |
| panic("no return value specified for CommentOn") | |
| } | |
| var r0 error | |
| if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |
| r0 = rf(ctx, clID, message) | |
| } else { | |
| r0 = ret.Error(0) | |
| } | |
| return r0 | |
| } | |
| // GetChangelist provides a mock function with given fields: ctx, id | |
| func (_m *Client) GetChangelist(ctx context.Context, id string) (code_review.Changelist, error) { | |
| ret := _m.Called(ctx, id) | |
| if len(ret) == 0 { | |
| panic("no return value specified for GetChangelist") | |
| } | |
| var r0 code_review.Changelist | |
| var r1 error | |
| if rf, ok := ret.Get(0).(func(context.Context, string) (code_review.Changelist, error)); ok { | |
| return rf(ctx, id) | |
| } | |
| if rf, ok := ret.Get(0).(func(context.Context, string) code_review.Changelist); ok { | |
| r0 = rf(ctx, id) | |
| } else { | |
| r0 = ret.Get(0).(code_review.Changelist) | |
| } | |
| if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| r1 = rf(ctx, id) | |
| } else { | |
| r1 = ret.Error(1) | |
| } | |
| return r0, r1 | |
| } | |
| // GetChangelistIDForCommit provides a mock function with given fields: ctx, commit | |
| func (_m *Client) GetChangelistIDForCommit(ctx context.Context, commit *vcsinfo.LongCommit) (string, error) { | |
| ret := _m.Called(ctx, commit) | |
| if len(ret) == 0 { | |
| panic("no return value specified for GetChangelistIDForCommit") | |
| } | |
| var r0 string | |
| var r1 error | |
| if rf, ok := ret.Get(0).(func(context.Context, *vcsinfo.LongCommit) (string, error)); ok { | |
| return rf(ctx, commit) | |
| } | |
| if rf, ok := ret.Get(0).(func(context.Context, *vcsinfo.LongCommit) string); ok { | |
| r0 = rf(ctx, commit) | |
| } else { | |
| r0 = ret.Get(0).(string) | |
| } | |
| if rf, ok := ret.Get(1).(func(context.Context, *vcsinfo.LongCommit) error); ok { | |
| r1 = rf(ctx, commit) | |
| } else { | |
| r1 = ret.Error(1) | |
| } | |
| return r0, r1 | |
| } | |
| // GetPatchset provides a mock function with given fields: ctx, clID, psID, psOrder | |
| func (_m *Client) GetPatchset(ctx context.Context, clID string, psID string, psOrder int) (code_review.Patchset, error) { | |
| ret := _m.Called(ctx, clID, psID, psOrder) | |
| if len(ret) == 0 { | |
| panic("no return value specified for GetPatchset") | |
| } | |
| var r0 code_review.Patchset | |
| var r1 error | |
| if rf, ok := ret.Get(0).(func(context.Context, string, string, int) (code_review.Patchset, error)); ok { | |
| return rf(ctx, clID, psID, psOrder) | |
| } | |
| if rf, ok := ret.Get(0).(func(context.Context, string, string, int) code_review.Patchset); ok { | |
| r0 = rf(ctx, clID, psID, psOrder) | |
| } else { | |
| r0 = ret.Get(0).(code_review.Patchset) | |
| } | |
| if rf, ok := ret.Get(1).(func(context.Context, string, string, int) error); ok { | |
| r1 = rf(ctx, clID, psID, psOrder) | |
| } else { | |
| r1 = ret.Error(1) | |
| } | |
| return r0, r1 | |
| } | |
| // NewClient creates a new instance of Client. 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 NewClient(t interface { | |
| mock.TestingT | |
| Cleanup(func()) | |
| }) *Client { | |
| mock := &Client{} | |
| mock.Mock.Test(t) | |
| t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| return mock | |
| } |