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