github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/decoder.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocknetwork 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // Decoder is an autogenerated mock type for the Decoder type 8 type Decoder struct { 9 mock.Mock 10 } 11 12 // Decode provides a mock function with given fields: 13 func (_m *Decoder) Decode() (interface{}, error) { 14 ret := _m.Called() 15 16 var r0 interface{} 17 var r1 error 18 if rf, ok := ret.Get(0).(func() (interface{}, error)); ok { 19 return rf() 20 } 21 if rf, ok := ret.Get(0).(func() interface{}); ok { 22 r0 = rf() 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(interface{}) 26 } 27 } 28 29 if rf, ok := ret.Get(1).(func() error); ok { 30 r1 = rf() 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 type mockConstructorTestingTNewDecoder interface { 39 mock.TestingT 40 Cleanup(func()) 41 } 42 43 // NewDecoder creates a new instance of Decoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 44 func NewDecoder(t mockConstructorTestingTNewDecoder) *Decoder { 45 mock := &Decoder{} 46 mock.Mock.Test(t) 47 48 t.Cleanup(func() { mock.AssertExpectations(t) }) 49 50 return mock 51 }