github.com/koko1123/flow-go-1@v0.29.6/fvm/environment/mock/event_emitter.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 cadence "github.com/onflow/cadence" 7 8 flow "github.com/koko1123/flow-go-1/model/flow" 9 10 mock "github.com/stretchr/testify/mock" 11 ) 12 13 // EventEmitter is an autogenerated mock type for the EventEmitter type 14 type EventEmitter struct { 15 mock.Mock 16 } 17 18 // EmitEvent provides a mock function with given fields: event 19 func (_m *EventEmitter) EmitEvent(event cadence.Event) error { 20 ret := _m.Called(event) 21 22 var r0 error 23 if rf, ok := ret.Get(0).(func(cadence.Event) error); ok { 24 r0 = rf(event) 25 } else { 26 r0 = ret.Error(0) 27 } 28 29 return r0 30 } 31 32 // Events provides a mock function with given fields: 33 func (_m *EventEmitter) Events() []flow.Event { 34 ret := _m.Called() 35 36 var r0 []flow.Event 37 if rf, ok := ret.Get(0).(func() []flow.Event); ok { 38 r0 = rf() 39 } else { 40 if ret.Get(0) != nil { 41 r0 = ret.Get(0).([]flow.Event) 42 } 43 } 44 45 return r0 46 } 47 48 // Reset provides a mock function with given fields: 49 func (_m *EventEmitter) Reset() { 50 _m.Called() 51 } 52 53 // ServiceEvents provides a mock function with given fields: 54 func (_m *EventEmitter) ServiceEvents() []flow.Event { 55 ret := _m.Called() 56 57 var r0 []flow.Event 58 if rf, ok := ret.Get(0).(func() []flow.Event); ok { 59 r0 = rf() 60 } else { 61 if ret.Get(0) != nil { 62 r0 = ret.Get(0).([]flow.Event) 63 } 64 } 65 66 return r0 67 } 68 69 type mockConstructorTestingTNewEventEmitter interface { 70 mock.TestingT 71 Cleanup(func()) 72 } 73 74 // NewEventEmitter creates a new instance of EventEmitter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 75 func NewEventEmitter(t mockConstructorTestingTNewEventEmitter) *EventEmitter { 76 mock := &EventEmitter{} 77 mock.Mock.Test(t) 78 79 t.Cleanup(func() { mock.AssertExpectations(t) }) 80 81 return mock 82 }