blob: 7523b89ffa0da1e8c4c54b422376f7042cbfbcb0 [file] [log] [blame]
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
incremental "go.skia.org/infra/status/go/incremental"
testing "testing"
time "time"
)
// IncrementalCache is an autogenerated mock type for the IncrementalCache type
type IncrementalCache struct {
mock.Mock
}
// Get provides a mock function with given fields: repo, since, maxCommits
func (_m *IncrementalCache) Get(repo string, since time.Time, maxCommits int) (*incremental.Update, error) {
ret := _m.Called(repo, since, maxCommits)
var r0 *incremental.Update
if rf, ok := ret.Get(0).(func(string, time.Time, int) *incremental.Update); ok {
r0 = rf(repo, since, maxCommits)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*incremental.Update)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, time.Time, int) error); ok {
r1 = rf(repo, since, maxCommits)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAll provides a mock function with given fields: repo, maxCommits
func (_m *IncrementalCache) GetAll(repo string, maxCommits int) (*incremental.Update, error) {
ret := _m.Called(repo, maxCommits)
var r0 *incremental.Update
if rf, ok := ret.Get(0).(func(string, int) *incremental.Update); ok {
r0 = rf(repo, maxCommits)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*incremental.Update)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, int) error); ok {
r1 = rf(repo, maxCommits)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetRange provides a mock function with given fields: repo, from, to, maxCommits
func (_m *IncrementalCache) GetRange(repo string, from time.Time, to time.Time, maxCommits int) (*incremental.Update, error) {
ret := _m.Called(repo, from, to, maxCommits)
var r0 *incremental.Update
if rf, ok := ret.Get(0).(func(string, time.Time, time.Time, int) *incremental.Update); ok {
r0 = rf(repo, from, to, maxCommits)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*incremental.Update)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, time.Time, time.Time, int) error); ok {
r1 = rf(repo, from, to, maxCommits)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Update provides a mock function with given fields: ctx, reset
func (_m *IncrementalCache) Update(ctx context.Context, reset bool) error {
ret := _m.Called(ctx, reset)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, bool) error); ok {
r0 = rf(ctx, reset)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateLoop provides a mock function with given fields: ctx, frequency
func (_m *IncrementalCache) UpdateLoop(ctx context.Context, frequency time.Duration) {
_m.Called(ctx, frequency)
}
// NewIncrementalCache creates a new instance of IncrementalCache. It also registers a cleanup function to assert the mocks expectations.
func NewIncrementalCache(t testing.TB) *IncrementalCache {
mock := &IncrementalCache{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}