| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| issuetracker "go.skia.org/infra/perf/go/issuetracker" |
| |
| v1 "go.skia.org/infra/go/issuetracker/v1" |
| ) |
| |
| // IssueTracker is an autogenerated mock type for the IssueTracker type |
| type IssueTracker struct { |
| mock.Mock |
| } |
| |
| // CreateComment provides a mock function with given fields: ctx, req |
| func (_m *IssueTracker) CreateComment(ctx context.Context, req *issuetracker.CreateCommentRequest) (*issuetracker.CreateCommentResponse, error) { |
| ret := _m.Called(ctx, req) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for CreateComment") |
| } |
| |
| var r0 *issuetracker.CreateCommentResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *issuetracker.CreateCommentRequest) (*issuetracker.CreateCommentResponse, error)); ok { |
| return rf(ctx, req) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *issuetracker.CreateCommentRequest) *issuetracker.CreateCommentResponse); ok { |
| r0 = rf(ctx, req) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*issuetracker.CreateCommentResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *issuetracker.CreateCommentRequest) error); ok { |
| r1 = rf(ctx, req) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ListIssues provides a mock function with given fields: ctx, requestObj |
| func (_m *IssueTracker) ListIssues(ctx context.Context, requestObj issuetracker.ListIssuesRequest) ([]*v1.Issue, error) { |
| ret := _m.Called(ctx, requestObj) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ListIssues") |
| } |
| |
| var r0 []*v1.Issue |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, issuetracker.ListIssuesRequest) ([]*v1.Issue, error)); ok { |
| return rf(ctx, requestObj) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, issuetracker.ListIssuesRequest) []*v1.Issue); ok { |
| r0 = rf(ctx, requestObj) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*v1.Issue) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, issuetracker.ListIssuesRequest) error); ok { |
| r1 = rf(ctx, requestObj) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewIssueTracker creates a new instance of IssueTracker. 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 NewIssueTracker(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *IssueTracker { |
| mock := &IssueTracker{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |