blob: 225a52bd439b361aee36084aa73363477d482d92 [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"
types "go.skia.org/infra/skcq/go/types"
)
// CurrentChangesCache is an autogenerated mock type for the CurrentChangesCache type
type CurrentChangesCache struct {
mock.Mock
}
// Add provides a mock function with given fields: ctx, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch, dryRun, internal, changeID, latestPatchsetID
func (_m *CurrentChangesCache) Add(ctx context.Context, changeEquivalentPatchset string, changeSubject string, changeOwner string, repo string, branch string, dryRun bool, internal bool, changeID int64, latestPatchsetID int64) (int64, bool, error) {
ret := _m.Called(ctx, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch, dryRun, internal, changeID, latestPatchsetID)
if len(ret) == 0 {
panic("no return value specified for Add")
}
var r0 int64
var r1 bool
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, bool, bool, int64, int64) (int64, bool, error)); ok {
return rf(ctx, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch, dryRun, internal, changeID, latestPatchsetID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, bool, bool, int64, int64) int64); ok {
r0 = rf(ctx, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch, dryRun, internal, changeID, latestPatchsetID)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string, bool, bool, int64, int64) bool); ok {
r1 = rf(ctx, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch, dryRun, internal, changeID, latestPatchsetID)
} else {
r1 = ret.Get(1).(bool)
}
if rf, ok := ret.Get(2).(func(context.Context, string, string, string, string, string, bool, bool, int64, int64) error); ok {
r2 = rf(ctx, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch, dryRun, internal, changeID, latestPatchsetID)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// Get provides a mock function with given fields:
func (_m *CurrentChangesCache) Get() map[string]*types.CurrentlyProcessingChange {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 map[string]*types.CurrentlyProcessingChange
if rf, ok := ret.Get(0).(func() map[string]*types.CurrentlyProcessingChange); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]*types.CurrentlyProcessingChange)
}
}
return r0
}
// Remove provides a mock function with given fields: ctx, changeEquivalentPatchset
func (_m *CurrentChangesCache) Remove(ctx context.Context, changeEquivalentPatchset string) error {
ret := _m.Called(ctx, changeEquivalentPatchset)
if len(ret) == 0 {
panic("no return value specified for Remove")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, changeEquivalentPatchset)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewCurrentChangesCache creates a new instance of CurrentChangesCache. 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 NewCurrentChangesCache(t interface {
mock.TestingT
Cleanup(func())
}) *CurrentChangesCache {
mock := &CurrentChangesCache{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}