github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/access/state_stream/mock/subscription.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // Subscription is an autogenerated mock type for the Subscription type 8 type Subscription struct { 9 mock.Mock 10 } 11 12 // Channel provides a mock function with given fields: 13 func (_m *Subscription) Channel() <-chan interface{} { 14 ret := _m.Called() 15 16 var r0 <-chan interface{} 17 if rf, ok := ret.Get(0).(func() <-chan interface{}); ok { 18 r0 = rf() 19 } else { 20 if ret.Get(0) != nil { 21 r0 = ret.Get(0).(<-chan interface{}) 22 } 23 } 24 25 return r0 26 } 27 28 // Err provides a mock function with given fields: 29 func (_m *Subscription) Err() error { 30 ret := _m.Called() 31 32 var r0 error 33 if rf, ok := ret.Get(0).(func() error); ok { 34 r0 = rf() 35 } else { 36 r0 = ret.Error(0) 37 } 38 39 return r0 40 } 41 42 // ID provides a mock function with given fields: 43 func (_m *Subscription) ID() string { 44 ret := _m.Called() 45 46 var r0 string 47 if rf, ok := ret.Get(0).(func() string); ok { 48 r0 = rf() 49 } else { 50 r0 = ret.Get(0).(string) 51 } 52 53 return r0 54 } 55 56 type mockConstructorTestingTNewSubscription interface { 57 mock.TestingT 58 Cleanup(func()) 59 } 60 61 // NewSubscription creates a new instance of Subscription. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 62 func NewSubscription(t mockConstructorTestingTNewSubscription) *Subscription { 63 mock := &Subscription{} 64 mock.Mock.Test(t) 65 66 t.Cleanup(func() { mock.AssertExpectations(t) }) 67 68 return mock 69 }