github.com/koko1123/flow-go-1@v0.29.6/fvm/environment/mock/event_encoder.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 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // EventEncoder is an autogenerated mock type for the EventEncoder type 12 type EventEncoder struct { 13 mock.Mock 14 } 15 16 // Encode provides a mock function with given fields: event 17 func (_m *EventEncoder) Encode(event cadence.Event) ([]byte, error) { 18 ret := _m.Called(event) 19 20 var r0 []byte 21 if rf, ok := ret.Get(0).(func(cadence.Event) []byte); ok { 22 r0 = rf(event) 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).([]byte) 26 } 27 } 28 29 var r1 error 30 if rf, ok := ret.Get(1).(func(cadence.Event) error); ok { 31 r1 = rf(event) 32 } else { 33 r1 = ret.Error(1) 34 } 35 36 return r0, r1 37 } 38 39 type mockConstructorTestingTNewEventEncoder interface { 40 mock.TestingT 41 Cleanup(func()) 42 } 43 44 // NewEventEncoder creates a new instance of EventEncoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 45 func NewEventEncoder(t mockConstructorTestingTNewEventEncoder) *EventEncoder { 46 mock := &EventEncoder{} 47 mock.Mock.Test(t) 48 49 t.Cleanup(func() { mock.AssertExpectations(t) }) 50 51 return mock 52 }