// Code generated by mockery. DO NOT EDIT. package mocks import ( context "context" github "github.com/google/go-github/v72/github" mock "github.com/stretchr/testify/mock" ) // RateLimitClient is an autogenerated mock type for the RateLimitClient type type RateLimitClient struct { mock.Mock } type RateLimitClient_Expecter struct { mock *mock.Mock } func (_m *RateLimitClient) EXPECT() *RateLimitClient_Expecter { return &RateLimitClient_Expecter{mock: &_m.Mock} } // RateLimit provides a mock function with given fields: ctx func (_m *RateLimitClient) RateLimit(ctx context.Context) (*github.RateLimits, error) { ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for RateLimit") } var r0 *github.RateLimits var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*github.RateLimits, error)); ok { return rf(ctx) } if rf, ok := ret.Get(0).(func(context.Context) *github.RateLimits); ok { r0 = rf(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*github.RateLimits) } } if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // RateLimitClient_RateLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RateLimit' type RateLimitClient_RateLimit_Call struct { *mock.Call } // RateLimit is a helper method to define mock.On call // - ctx context.Context func (_e *RateLimitClient_Expecter) RateLimit(ctx interface{}) *RateLimitClient_RateLimit_Call { return &RateLimitClient_RateLimit_Call{Call: _e.mock.On("RateLimit", ctx)} } func (_c *RateLimitClient_RateLimit_Call) Run(run func(ctx context.Context)) *RateLimitClient_RateLimit_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } func (_c *RateLimitClient_RateLimit_Call) Return(_a0 *github.RateLimits, _a1 error) *RateLimitClient_RateLimit_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *RateLimitClient_RateLimit_Call) RunAndReturn(run func(context.Context) (*github.RateLimits, error)) *RateLimitClient_RateLimit_Call { _c.Call.Return(run) return _c } // NewRateLimitClient creates a new instance of RateLimitClient. 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 NewRateLimitClient(t interface { mock.TestingT Cleanup(func()) }) *RateLimitClient { mock := &RateLimitClient{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }