github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/protocol_state/epochs/mock/state_machine_factory_method.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 epochs "github.com/onflow/flow-go/state/protocol/protocol_state/epochs" 8 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // StateMachineFactoryMethod is an autogenerated mock type for the StateMachineFactoryMethod type 13 type StateMachineFactoryMethod struct { 14 mock.Mock 15 } 16 17 // Execute provides a mock function with given fields: candidateView, parentState 18 func (_m *StateMachineFactoryMethod) Execute(candidateView uint64, parentState *flow.RichProtocolStateEntry) (epochs.StateMachine, error) { 19 ret := _m.Called(candidateView, parentState) 20 21 var r0 epochs.StateMachine 22 var r1 error 23 if rf, ok := ret.Get(0).(func(uint64, *flow.RichProtocolStateEntry) (epochs.StateMachine, error)); ok { 24 return rf(candidateView, parentState) 25 } 26 if rf, ok := ret.Get(0).(func(uint64, *flow.RichProtocolStateEntry) epochs.StateMachine); ok { 27 r0 = rf(candidateView, parentState) 28 } else { 29 if ret.Get(0) != nil { 30 r0 = ret.Get(0).(epochs.StateMachine) 31 } 32 } 33 34 if rf, ok := ret.Get(1).(func(uint64, *flow.RichProtocolStateEntry) error); ok { 35 r1 = rf(candidateView, parentState) 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 type mockConstructorTestingTNewStateMachineFactoryMethod interface { 44 mock.TestingT 45 Cleanup(func()) 46 } 47 48 // NewStateMachineFactoryMethod creates a new instance of StateMachineFactoryMethod. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 49 func NewStateMachineFactoryMethod(t mockConstructorTestingTNewStateMachineFactoryMethod) *StateMachineFactoryMethod { 50 mock := &StateMachineFactoryMethod{} 51 mock.Mock.Test(t) 52 53 t.Cleanup(func() { mock.AssertExpectations(t) }) 54 55 return mock 56 }