blob: 068a854eb9de682105ed0370f92ad9c55ef6e74c [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"
favorites "go.skia.org/infra/perf/go/favorites"
)
// Store is an autogenerated mock type for the Store type
type Store struct {
mock.Mock
}
// Create provides a mock function with given fields: ctx, req
func (_m *Store) Create(ctx context.Context, req *favorites.SaveRequest) error {
ret := _m.Called(ctx, req)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *favorites.SaveRequest) error); ok {
r0 = rf(ctx, req)
} else {
r0 = ret.Error(0)
}
return r0
}
// Delete provides a mock function with given fields: ctx, userId, id
func (_m *Store) Delete(ctx context.Context, userId string, id string) error {
ret := _m.Called(ctx, userId, id)
if len(ret) == 0 {
panic("no return value specified for Delete")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, userId, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: ctx, id
func (_m *Store) Get(ctx context.Context, id string) (*favorites.Favorite, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *favorites.Favorite
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*favorites.Favorite, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *favorites.Favorite); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*favorites.Favorite)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: ctx, userId
func (_m *Store) List(ctx context.Context, userId string) ([]*favorites.Favorite, error) {
ret := _m.Called(ctx, userId)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 []*favorites.Favorite
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*favorites.Favorite, error)); ok {
return rf(ctx, userId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*favorites.Favorite); ok {
r0 = rf(ctx, userId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*favorites.Favorite)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, userId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Liveness provides a mock function with given fields: ctx
func (_m *Store) Liveness(ctx context.Context) error {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for Liveness")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// Update provides a mock function with given fields: ctx, req, id
func (_m *Store) Update(ctx context.Context, req *favorites.SaveRequest, id string) error {
ret := _m.Called(ctx, req, id)
if len(ret) == 0 {
panic("no return value specified for Update")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *favorites.SaveRequest, string) error); ok {
r0 = rf(ctx, req, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewStore creates a new instance of Store. 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 NewStore(t interface {
mock.TestingT
Cleanup(func())
}) *Store {
mock := &Store{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}