blob: 284bf159ab68be0e9f43ec3ed0d0e9c3885e88d5 [file] [log] [blame]
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
package mocks
import (
context "context"
io "io"
mock "github.com/stretchr/testify/mock"
scrap "go.skia.org/infra/scrap/go/scrap"
testing "testing"
)
// ScrapExchange is an autogenerated mock type for the ScrapExchange type
type ScrapExchange struct {
mock.Mock
}
// CreateScrap provides a mock function with given fields: ctx, _a1
func (_m *ScrapExchange) CreateScrap(ctx context.Context, _a1 scrap.ScrapBody) (scrap.ScrapID, error) {
ret := _m.Called(ctx, _a1)
var r0 scrap.ScrapID
if rf, ok := ret.Get(0).(func(context.Context, scrap.ScrapBody) scrap.ScrapID); ok {
r0 = rf(ctx, _a1)
} else {
r0 = ret.Get(0).(scrap.ScrapID)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, scrap.ScrapBody) error); ok {
r1 = rf(ctx, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeleteName provides a mock function with given fields: ctx, t, name
func (_m *ScrapExchange) DeleteName(ctx context.Context, t scrap.Type, name string) error {
ret := _m.Called(ctx, t, name)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, scrap.Type, string) error); ok {
r0 = rf(ctx, t, name)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteScrap provides a mock function with given fields: ctx, t, hashOrName
func (_m *ScrapExchange) DeleteScrap(ctx context.Context, t scrap.Type, hashOrName string) error {
ret := _m.Called(ctx, t, hashOrName)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, scrap.Type, string) error); ok {
r0 = rf(ctx, t, hashOrName)
} else {
r0 = ret.Error(0)
}
return r0
}
// Expand provides a mock function with given fields: ctx, t, hashOrName, lang, w
func (_m *ScrapExchange) Expand(ctx context.Context, t scrap.Type, hashOrName string, lang scrap.Lang, w io.Writer) error {
ret := _m.Called(ctx, t, hashOrName, lang, w)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, scrap.Type, string, scrap.Lang, io.Writer) error); ok {
r0 = rf(ctx, t, hashOrName, lang, w)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetName provides a mock function with given fields: ctx, t, name
func (_m *ScrapExchange) GetName(ctx context.Context, t scrap.Type, name string) (scrap.Name, error) {
ret := _m.Called(ctx, t, name)
var r0 scrap.Name
if rf, ok := ret.Get(0).(func(context.Context, scrap.Type, string) scrap.Name); ok {
r0 = rf(ctx, t, name)
} else {
r0 = ret.Get(0).(scrap.Name)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, scrap.Type, string) error); ok {
r1 = rf(ctx, t, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListNames provides a mock function with given fields: ctx, t
func (_m *ScrapExchange) ListNames(ctx context.Context, t scrap.Type) ([]string, error) {
ret := _m.Called(ctx, t)
var r0 []string
if rf, ok := ret.Get(0).(func(context.Context, scrap.Type) []string); ok {
r0 = rf(ctx, t)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, scrap.Type) error); ok {
r1 = rf(ctx, t)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// LoadScrap provides a mock function with given fields: ctx, t, hashOrName
func (_m *ScrapExchange) LoadScrap(ctx context.Context, t scrap.Type, hashOrName string) (scrap.ScrapBody, error) {
ret := _m.Called(ctx, t, hashOrName)
var r0 scrap.ScrapBody
if rf, ok := ret.Get(0).(func(context.Context, scrap.Type, string) scrap.ScrapBody); ok {
r0 = rf(ctx, t, hashOrName)
} else {
r0 = ret.Get(0).(scrap.ScrapBody)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, scrap.Type, string) error); ok {
r1 = rf(ctx, t, hashOrName)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PutName provides a mock function with given fields: ctx, t, name, nameBody
func (_m *ScrapExchange) PutName(ctx context.Context, t scrap.Type, name string, nameBody scrap.Name) error {
ret := _m.Called(ctx, t, name, nameBody)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, scrap.Type, string, scrap.Name) error); ok {
r0 = rf(ctx, t, name, nameBody)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewScrapExchange creates a new instance of ScrapExchange. It also registers a cleanup function to assert the mocks expectations.
func NewScrapExchange(t testing.TB) *ScrapExchange {
mock := &ScrapExchange{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}