github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/mock/versioned_encodable.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 // VersionedEncodable is an autogenerated mock type for the VersionedEncodable type 8 type VersionedEncodable struct { 9 mock.Mock 10 } 11 12 // VersionedEncode provides a mock function with given fields: 13 func (_m *VersionedEncodable) VersionedEncode() (uint64, []byte, error) { 14 ret := _m.Called() 15 16 var r0 uint64 17 var r1 []byte 18 var r2 error 19 if rf, ok := ret.Get(0).(func() (uint64, []byte, error)); ok { 20 return rf() 21 } 22 if rf, ok := ret.Get(0).(func() uint64); ok { 23 r0 = rf() 24 } else { 25 r0 = ret.Get(0).(uint64) 26 } 27 28 if rf, ok := ret.Get(1).(func() []byte); ok { 29 r1 = rf() 30 } else { 31 if ret.Get(1) != nil { 32 r1 = ret.Get(1).([]byte) 33 } 34 } 35 36 if rf, ok := ret.Get(2).(func() error); ok { 37 r2 = rf() 38 } else { 39 r2 = ret.Error(2) 40 } 41 42 return r0, r1, r2 43 } 44 45 type mockConstructorTestingTNewVersionedEncodable interface { 46 mock.TestingT 47 Cleanup(func()) 48 } 49 50 // NewVersionedEncodable creates a new instance of VersionedEncodable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 51 func NewVersionedEncodable(t mockConstructorTestingTNewVersionedEncodable) *VersionedEncodable { 52 mock := &VersionedEncodable{} 53 mock.Mock.Test(t) 54 55 t.Cleanup(func() { mock.AssertExpectations(t) }) 56 57 return mock 58 }