github.com/yandex/pandora@v0.5.32/core/mocks/provider.go (about) 1 // Code generated by mockery v2.20.2. DO NOT EDIT. 2 3 package coremock 4 5 import ( 6 context "context" 7 8 core "github.com/yandex/pandora/core" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // Provider is an autogenerated mock type for the Provider type 13 type Provider struct { 14 mock.Mock 15 } 16 17 // Acquire provides a mock function with given fields: 18 func (_m *Provider) Acquire() (core.Ammo, bool) { 19 ret := _m.Called() 20 21 var r0 core.Ammo 22 var r1 bool 23 if rf, ok := ret.Get(0).(func() (core.Ammo, bool)); ok { 24 return rf() 25 } 26 if rf, ok := ret.Get(0).(func() core.Ammo); ok { 27 r0 = rf() 28 } else { 29 if ret.Get(0) != nil { 30 r0 = ret.Get(0).(core.Ammo) 31 } 32 } 33 34 if rf, ok := ret.Get(1).(func() bool); ok { 35 r1 = rf() 36 } else { 37 r1 = ret.Get(1).(bool) 38 } 39 40 return r0, r1 41 } 42 43 // Release provides a mock function with given fields: ammo 44 func (_m *Provider) Release(ammo core.Ammo) { 45 _m.Called(ammo) 46 } 47 48 // Run provides a mock function with given fields: ctx, deps 49 func (_m *Provider) Run(ctx context.Context, deps core.ProviderDeps) error { 50 ret := _m.Called(ctx, deps) 51 52 var r0 error 53 if rf, ok := ret.Get(0).(func(context.Context, core.ProviderDeps) error); ok { 54 r0 = rf(ctx, deps) 55 } else { 56 r0 = ret.Error(0) 57 } 58 59 return r0 60 } 61 62 type mockConstructorTestingTNewProvider interface { 63 mock.TestingT 64 Cleanup(func()) 65 } 66 67 // NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 68 func NewProvider(t mockConstructorTestingTNewProvider) *Provider { 69 mock := &Provider{} 70 mock.Mock.Test(t) 71 72 t.Cleanup(func() { mock.AssertExpectations(t) }) 73 74 return mock 75 }