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