github.com/koko1123/flow-go-1@v0.29.6/engine/collection/epochmgr/mock/epoch_components_factory.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 cluster "github.com/koko1123/flow-go-1/state/cluster" 7 8 hotstuff "github.com/koko1123/flow-go-1/consensus/hotstuff" 9 10 mock "github.com/stretchr/testify/mock" 11 12 module "github.com/koko1123/flow-go-1/module" 13 14 network "github.com/koko1123/flow-go-1/network" 15 16 protocol "github.com/koko1123/flow-go-1/state/protocol" 17 ) 18 19 // EpochComponentsFactory is an autogenerated mock type for the EpochComponentsFactory type 20 type EpochComponentsFactory struct { 21 mock.Mock 22 } 23 24 // Create provides a mock function with given fields: epoch 25 func (_m *EpochComponentsFactory) Create(epoch protocol.Epoch) (cluster.State, network.Engine, network.Engine, module.HotStuff, hotstuff.VoteAggregator, error) { 26 ret := _m.Called(epoch) 27 28 var r0 cluster.State 29 if rf, ok := ret.Get(0).(func(protocol.Epoch) cluster.State); ok { 30 r0 = rf(epoch) 31 } else { 32 if ret.Get(0) != nil { 33 r0 = ret.Get(0).(cluster.State) 34 } 35 } 36 37 var r1 network.Engine 38 if rf, ok := ret.Get(1).(func(protocol.Epoch) network.Engine); ok { 39 r1 = rf(epoch) 40 } else { 41 if ret.Get(1) != nil { 42 r1 = ret.Get(1).(network.Engine) 43 } 44 } 45 46 var r2 network.Engine 47 if rf, ok := ret.Get(2).(func(protocol.Epoch) network.Engine); ok { 48 r2 = rf(epoch) 49 } else { 50 if ret.Get(2) != nil { 51 r2 = ret.Get(2).(network.Engine) 52 } 53 } 54 55 var r3 module.HotStuff 56 if rf, ok := ret.Get(3).(func(protocol.Epoch) module.HotStuff); ok { 57 r3 = rf(epoch) 58 } else { 59 if ret.Get(3) != nil { 60 r3 = ret.Get(3).(module.HotStuff) 61 } 62 } 63 64 var r4 hotstuff.VoteAggregator 65 if rf, ok := ret.Get(4).(func(protocol.Epoch) hotstuff.VoteAggregator); ok { 66 r4 = rf(epoch) 67 } else { 68 if ret.Get(4) != nil { 69 r4 = ret.Get(4).(hotstuff.VoteAggregator) 70 } 71 } 72 73 var r5 error 74 if rf, ok := ret.Get(5).(func(protocol.Epoch) error); ok { 75 r5 = rf(epoch) 76 } else { 77 r5 = ret.Error(5) 78 } 79 80 return r0, r1, r2, r3, r4, r5 81 } 82 83 type mockConstructorTestingTNewEpochComponentsFactory interface { 84 mock.TestingT 85 Cleanup(func()) 86 } 87 88 // NewEpochComponentsFactory creates a new instance of EpochComponentsFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 89 func NewEpochComponentsFactory(t mockConstructorTestingTNewEpochComponentsFactory) *EpochComponentsFactory { 90 mock := &EpochComponentsFactory{} 91 mock.Mock.Test(t) 92 93 t.Cleanup(func() { mock.AssertExpectations(t) }) 94 95 return mock 96 }