| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301 |
- // Code generated by mockery; DO NOT EDIT.
- // github.com/vektra/mockery
- // template: testify
- package http
- import (
- "context"
- "github.com/mk6i/open-oscar-server/state"
- mock "github.com/stretchr/testify/mock"
- )
- // newMockBARTAssetManager creates a new instance of mockBARTAssetManager. 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 newMockBARTAssetManager(t interface {
- mock.TestingT
- Cleanup(func())
- }) *mockBARTAssetManager {
- mock := &mockBARTAssetManager{}
- mock.Mock.Test(t)
- t.Cleanup(func() { mock.AssertExpectations(t) })
- return mock
- }
- // mockBARTAssetManager is an autogenerated mock type for the BARTAssetManager type
- type mockBARTAssetManager struct {
- mock.Mock
- }
- type mockBARTAssetManager_Expecter struct {
- mock *mock.Mock
- }
- func (_m *mockBARTAssetManager) EXPECT() *mockBARTAssetManager_Expecter {
- return &mockBARTAssetManager_Expecter{mock: &_m.Mock}
- }
- // BARTItem provides a mock function for the type mockBARTAssetManager
- func (_mock *mockBARTAssetManager) BARTItem(ctx context.Context, hash []byte) ([]byte, error) {
- ret := _mock.Called(ctx, hash)
- if len(ret) == 0 {
- panic("no return value specified for BARTItem")
- }
- var r0 []byte
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) ([]byte, error)); ok {
- return returnFunc(ctx, hash)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) []byte); ok {
- r0 = returnFunc(ctx, hash)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).([]byte)
- }
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok {
- r1 = returnFunc(ctx, hash)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockBARTAssetManager_BARTItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BARTItem'
- type mockBARTAssetManager_BARTItem_Call struct {
- *mock.Call
- }
- // BARTItem is a helper method to define mock.On call
- // - ctx context.Context
- // - hash []byte
- func (_e *mockBARTAssetManager_Expecter) BARTItem(ctx interface{}, hash interface{}) *mockBARTAssetManager_BARTItem_Call {
- return &mockBARTAssetManager_BARTItem_Call{Call: _e.mock.On("BARTItem", ctx, hash)}
- }
- func (_c *mockBARTAssetManager_BARTItem_Call) Run(run func(ctx context.Context, hash []byte)) *mockBARTAssetManager_BARTItem_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 []byte
- if args[1] != nil {
- arg1 = args[1].([]byte)
- }
- run(
- arg0,
- arg1,
- )
- })
- return _c
- }
- func (_c *mockBARTAssetManager_BARTItem_Call) Return(bytes []byte, err error) *mockBARTAssetManager_BARTItem_Call {
- _c.Call.Return(bytes, err)
- return _c
- }
- func (_c *mockBARTAssetManager_BARTItem_Call) RunAndReturn(run func(ctx context.Context, hash []byte) ([]byte, error)) *mockBARTAssetManager_BARTItem_Call {
- _c.Call.Return(run)
- return _c
- }
- // DeleteBARTItem provides a mock function for the type mockBARTAssetManager
- func (_mock *mockBARTAssetManager) DeleteBARTItem(ctx context.Context, hash []byte) error {
- ret := _mock.Called(ctx, hash)
- if len(ret) == 0 {
- panic("no return value specified for DeleteBARTItem")
- }
- var r0 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) error); ok {
- r0 = returnFunc(ctx, hash)
- } else {
- r0 = ret.Error(0)
- }
- return r0
- }
- // mockBARTAssetManager_DeleteBARTItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBARTItem'
- type mockBARTAssetManager_DeleteBARTItem_Call struct {
- *mock.Call
- }
- // DeleteBARTItem is a helper method to define mock.On call
- // - ctx context.Context
- // - hash []byte
- func (_e *mockBARTAssetManager_Expecter) DeleteBARTItem(ctx interface{}, hash interface{}) *mockBARTAssetManager_DeleteBARTItem_Call {
- return &mockBARTAssetManager_DeleteBARTItem_Call{Call: _e.mock.On("DeleteBARTItem", ctx, hash)}
- }
- func (_c *mockBARTAssetManager_DeleteBARTItem_Call) Run(run func(ctx context.Context, hash []byte)) *mockBARTAssetManager_DeleteBARTItem_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 []byte
- if args[1] != nil {
- arg1 = args[1].([]byte)
- }
- run(
- arg0,
- arg1,
- )
- })
- return _c
- }
- func (_c *mockBARTAssetManager_DeleteBARTItem_Call) Return(err error) *mockBARTAssetManager_DeleteBARTItem_Call {
- _c.Call.Return(err)
- return _c
- }
- func (_c *mockBARTAssetManager_DeleteBARTItem_Call) RunAndReturn(run func(ctx context.Context, hash []byte) error) *mockBARTAssetManager_DeleteBARTItem_Call {
- _c.Call.Return(run)
- return _c
- }
- // InsertBARTItem provides a mock function for the type mockBARTAssetManager
- func (_mock *mockBARTAssetManager) InsertBARTItem(ctx context.Context, hash []byte, blob []byte, itemType uint16) error {
- ret := _mock.Called(ctx, hash, blob, itemType)
- if len(ret) == 0 {
- panic("no return value specified for InsertBARTItem")
- }
- var r0 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, []byte, []byte, uint16) error); ok {
- r0 = returnFunc(ctx, hash, blob, itemType)
- } else {
- r0 = ret.Error(0)
- }
- return r0
- }
- // mockBARTAssetManager_InsertBARTItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertBARTItem'
- type mockBARTAssetManager_InsertBARTItem_Call struct {
- *mock.Call
- }
- // InsertBARTItem is a helper method to define mock.On call
- // - ctx context.Context
- // - hash []byte
- // - blob []byte
- // - itemType uint16
- func (_e *mockBARTAssetManager_Expecter) InsertBARTItem(ctx interface{}, hash interface{}, blob interface{}, itemType interface{}) *mockBARTAssetManager_InsertBARTItem_Call {
- return &mockBARTAssetManager_InsertBARTItem_Call{Call: _e.mock.On("InsertBARTItem", ctx, hash, blob, itemType)}
- }
- func (_c *mockBARTAssetManager_InsertBARTItem_Call) Run(run func(ctx context.Context, hash []byte, blob []byte, itemType uint16)) *mockBARTAssetManager_InsertBARTItem_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 []byte
- if args[1] != nil {
- arg1 = args[1].([]byte)
- }
- var arg2 []byte
- if args[2] != nil {
- arg2 = args[2].([]byte)
- }
- var arg3 uint16
- if args[3] != nil {
- arg3 = args[3].(uint16)
- }
- run(
- arg0,
- arg1,
- arg2,
- arg3,
- )
- })
- return _c
- }
- func (_c *mockBARTAssetManager_InsertBARTItem_Call) Return(err error) *mockBARTAssetManager_InsertBARTItem_Call {
- _c.Call.Return(err)
- return _c
- }
- func (_c *mockBARTAssetManager_InsertBARTItem_Call) RunAndReturn(run func(ctx context.Context, hash []byte, blob []byte, itemType uint16) error) *mockBARTAssetManager_InsertBARTItem_Call {
- _c.Call.Return(run)
- return _c
- }
- // ListBARTItems provides a mock function for the type mockBARTAssetManager
- func (_mock *mockBARTAssetManager) ListBARTItems(ctx context.Context, itemType uint16) ([]state.BARTItem, error) {
- ret := _mock.Called(ctx, itemType)
- if len(ret) == 0 {
- panic("no return value specified for ListBARTItems")
- }
- var r0 []state.BARTItem
- var r1 error
- if returnFunc, ok := ret.Get(0).(func(context.Context, uint16) ([]state.BARTItem, error)); ok {
- return returnFunc(ctx, itemType)
- }
- if returnFunc, ok := ret.Get(0).(func(context.Context, uint16) []state.BARTItem); ok {
- r0 = returnFunc(ctx, itemType)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).([]state.BARTItem)
- }
- }
- if returnFunc, ok := ret.Get(1).(func(context.Context, uint16) error); ok {
- r1 = returnFunc(ctx, itemType)
- } else {
- r1 = ret.Error(1)
- }
- return r0, r1
- }
- // mockBARTAssetManager_ListBARTItems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBARTItems'
- type mockBARTAssetManager_ListBARTItems_Call struct {
- *mock.Call
- }
- // ListBARTItems is a helper method to define mock.On call
- // - ctx context.Context
- // - itemType uint16
- func (_e *mockBARTAssetManager_Expecter) ListBARTItems(ctx interface{}, itemType interface{}) *mockBARTAssetManager_ListBARTItems_Call {
- return &mockBARTAssetManager_ListBARTItems_Call{Call: _e.mock.On("ListBARTItems", ctx, itemType)}
- }
- func (_c *mockBARTAssetManager_ListBARTItems_Call) Run(run func(ctx context.Context, itemType uint16)) *mockBARTAssetManager_ListBARTItems_Call {
- _c.Call.Run(func(args mock.Arguments) {
- var arg0 context.Context
- if args[0] != nil {
- arg0 = args[0].(context.Context)
- }
- var arg1 uint16
- if args[1] != nil {
- arg1 = args[1].(uint16)
- }
- run(
- arg0,
- arg1,
- )
- })
- return _c
- }
- func (_c *mockBARTAssetManager_ListBARTItems_Call) Return(bARTItems []state.BARTItem, err error) *mockBARTAssetManager_ListBARTItems_Call {
- _c.Call.Return(bARTItems, err)
- return _c
- }
- func (_c *mockBARTAssetManager_ListBARTItems_Call) RunAndReturn(run func(ctx context.Context, itemType uint16) ([]state.BARTItem, error)) *mockBARTAssetManager_ListBARTItems_Call {
- _c.Call.Return(run)
- return _c
- }
|