github.com/koko1123/flow-go-1@v0.29.6/fvm/environment/mock/block_info.go (about) 1 // Code generated by mockery v2.13.1. 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 if rf, ok := ret.Get(0).(func(uint64) stdlib.Block); ok { 21 r0 = rf(height) 22 } else { 23 r0 = ret.Get(0).(stdlib.Block) 24 } 25 26 var r1 bool 27 if rf, ok := ret.Get(1).(func(uint64) bool); ok { 28 r1 = rf(height) 29 } else { 30 r1 = ret.Get(1).(bool) 31 } 32 33 var r2 error 34 if rf, ok := ret.Get(2).(func(uint64) error); ok { 35 r2 = rf(height) 36 } else { 37 r2 = ret.Error(2) 38 } 39 40 return r0, r1, r2 41 } 42 43 // GetCurrentBlockHeight provides a mock function with given fields: 44 func (_m *BlockInfo) GetCurrentBlockHeight() (uint64, error) { 45 ret := _m.Called() 46 47 var r0 uint64 48 if rf, ok := ret.Get(0).(func() uint64); ok { 49 r0 = rf() 50 } else { 51 r0 = ret.Get(0).(uint64) 52 } 53 54 var r1 error 55 if rf, ok := ret.Get(1).(func() error); ok { 56 r1 = rf() 57 } else { 58 r1 = ret.Error(1) 59 } 60 61 return r0, r1 62 } 63 64 type mockConstructorTestingTNewBlockInfo interface { 65 mock.TestingT 66 Cleanup(func()) 67 } 68 69 // 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. 70 func NewBlockInfo(t mockConstructorTestingTNewBlockInfo) *BlockInfo { 71 mock := &BlockInfo{} 72 mock.Mock.Test(t) 73 74 t.Cleanup(func() { mock.AssertExpectations(t) }) 75 76 return mock 77 }