| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| codereview "go.skia.org/infra/docsyserver/go/codereview" |
| |
| mock "github.com/stretchr/testify/mock" |
| |
| testing "testing" |
| ) |
| |
| // CodeReview is an autogenerated mock type for the CodeReview type |
| type CodeReview struct { |
| mock.Mock |
| } |
| |
| // GetFile provides a mock function with given fields: ctx, filename, ref |
| func (_m *CodeReview) GetFile(ctx context.Context, filename string, ref string) ([]byte, error) { |
| ret := _m.Called(ctx, filename, ref) |
| |
| var r0 []byte |
| if rf, ok := ret.Get(0).(func(context.Context, string, string) []byte); ok { |
| r0 = rf(ctx, filename, ref) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]byte) |
| } |
| } |
| |
| var r1 error |
| if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { |
| r1 = rf(ctx, filename, ref) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetPatchsetInfo provides a mock function with given fields: ctx, issue |
| func (_m *CodeReview) GetPatchsetInfo(ctx context.Context, issue codereview.Issue) (string, bool, error) { |
| ret := _m.Called(ctx, issue) |
| |
| var r0 string |
| if rf, ok := ret.Get(0).(func(context.Context, codereview.Issue) string); ok { |
| r0 = rf(ctx, issue) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| var r1 bool |
| if rf, ok := ret.Get(1).(func(context.Context, codereview.Issue) bool); ok { |
| r1 = rf(ctx, issue) |
| } else { |
| r1 = ret.Get(1).(bool) |
| } |
| |
| var r2 error |
| if rf, ok := ret.Get(2).(func(context.Context, codereview.Issue) error); ok { |
| r2 = rf(ctx, issue) |
| } else { |
| r2 = ret.Error(2) |
| } |
| |
| return r0, r1, r2 |
| } |
| |
| // ListModifiedFiles provides a mock function with given fields: ctx, issue, ref |
| func (_m *CodeReview) ListModifiedFiles(ctx context.Context, issue codereview.Issue, ref string) ([]codereview.ListModifiedFilesResult, error) { |
| ret := _m.Called(ctx, issue, ref) |
| |
| var r0 []codereview.ListModifiedFilesResult |
| if rf, ok := ret.Get(0).(func(context.Context, codereview.Issue, string) []codereview.ListModifiedFilesResult); ok { |
| r0 = rf(ctx, issue, ref) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]codereview.ListModifiedFilesResult) |
| } |
| } |
| |
| var r1 error |
| if rf, ok := ret.Get(1).(func(context.Context, codereview.Issue, string) error); ok { |
| r1 = rf(ctx, issue, ref) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewCodeReview creates a new instance of CodeReview. It also registers a cleanup function to assert the mocks expectations. |
| func NewCodeReview(t testing.TB) *CodeReview { |
| mock := &CodeReview{} |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |