github.com/koko1123/flow-go-1@v0.29.6/engine/execution/computation/computer/mock/block_computer.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 context "context" 7 8 derived "github.com/koko1123/flow-go-1/fvm/derived" 9 entity "github.com/koko1123/flow-go-1/module/mempool/entity" 10 11 execution "github.com/koko1123/flow-go-1/engine/execution" 12 13 mock "github.com/stretchr/testify/mock" 14 15 state "github.com/koko1123/flow-go-1/fvm/state" 16 ) 17 18 // BlockComputer is an autogenerated mock type for the BlockComputer type 19 type BlockComputer struct { 20 mock.Mock 21 } 22 23 // ExecuteBlock provides a mock function with given fields: _a0, _a1, _a2, _a3 24 func (_m *BlockComputer) ExecuteBlock(_a0 context.Context, _a1 *entity.ExecutableBlock, _a2 state.View, _a3 *derived.DerivedBlockData) (*execution.ComputationResult, error) { 25 ret := _m.Called(_a0, _a1, _a2, _a3) 26 27 var r0 *execution.ComputationResult 28 if rf, ok := ret.Get(0).(func(context.Context, *entity.ExecutableBlock, state.View, *derived.DerivedBlockData) *execution.ComputationResult); ok { 29 r0 = rf(_a0, _a1, _a2, _a3) 30 } else { 31 if ret.Get(0) != nil { 32 r0 = ret.Get(0).(*execution.ComputationResult) 33 } 34 } 35 36 var r1 error 37 if rf, ok := ret.Get(1).(func(context.Context, *entity.ExecutableBlock, state.View, *derived.DerivedBlockData) error); ok { 38 r1 = rf(_a0, _a1, _a2, _a3) 39 } else { 40 r1 = ret.Error(1) 41 } 42 43 return r0, r1 44 } 45 46 type mockConstructorTestingTNewBlockComputer interface { 47 mock.TestingT 48 Cleanup(func()) 49 } 50 51 // NewBlockComputer creates a new instance of BlockComputer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 52 func NewBlockComputer(t mockConstructorTestingTNewBlockComputer) *BlockComputer { 53 mock := &BlockComputer{} 54 mock.Mock.Test(t) 55 56 t.Cleanup(func() { mock.AssertExpectations(t) }) 57 58 return mock 59 }