github.com/koko1123/flow-go-1@v0.29.6/module/mock/epoch_lookup.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // EpochLookup is an autogenerated mock type for the EpochLookup type 8 type EpochLookup struct { 9 mock.Mock 10 } 11 12 // EpochForView provides a mock function with given fields: view 13 func (_m *EpochLookup) EpochForView(view uint64) (uint64, error) { 14 ret := _m.Called(view) 15 16 var r0 uint64 17 if rf, ok := ret.Get(0).(func(uint64) uint64); ok { 18 r0 = rf(view) 19 } else { 20 r0 = ret.Get(0).(uint64) 21 } 22 23 var r1 error 24 if rf, ok := ret.Get(1).(func(uint64) error); ok { 25 r1 = rf(view) 26 } else { 27 r1 = ret.Error(1) 28 } 29 30 return r0, r1 31 } 32 33 // EpochForViewWithFallback provides a mock function with given fields: view 34 func (_m *EpochLookup) EpochForViewWithFallback(view uint64) (uint64, error) { 35 ret := _m.Called(view) 36 37 var r0 uint64 38 if rf, ok := ret.Get(0).(func(uint64) uint64); ok { 39 r0 = rf(view) 40 } else { 41 r0 = ret.Get(0).(uint64) 42 } 43 44 var r1 error 45 if rf, ok := ret.Get(1).(func(uint64) error); ok { 46 r1 = rf(view) 47 } else { 48 r1 = ret.Error(1) 49 } 50 51 return r0, r1 52 } 53 54 type mockConstructorTestingTNewEpochLookup interface { 55 mock.TestingT 56 Cleanup(func()) 57 } 58 59 // NewEpochLookup creates a new instance of EpochLookup. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 60 func NewEpochLookup(t mockConstructorTestingTNewEpochLookup) *EpochLookup { 61 mock := &EpochLookup{} 62 mock.Mock.Test(t) 63 64 t.Cleanup(func() { mock.AssertExpectations(t) }) 65 66 return mock 67 }