github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/execution/computation/computer/mock/block_computer.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	context "context"
     7  
     8  	derived "github.com/onflow/flow-go/fvm/storage/derived"
     9  	entity "github.com/onflow/flow-go/module/mempool/entity"
    10  
    11  	execution "github.com/onflow/flow-go/engine/execution"
    12  
    13  	flow "github.com/onflow/flow-go/model/flow"
    14  
    15  	mock "github.com/stretchr/testify/mock"
    16  
    17  	snapshot "github.com/onflow/flow-go/fvm/storage/snapshot"
    18  )
    19  
    20  // BlockComputer is an autogenerated mock type for the BlockComputer type
    21  type BlockComputer struct {
    22  	mock.Mock
    23  }
    24  
    25  // ExecuteBlock provides a mock function with given fields: ctx, parentBlockExecutionResultID, block, _a3, derivedBlockData
    26  func (_m *BlockComputer) ExecuteBlock(ctx context.Context, parentBlockExecutionResultID flow.Identifier, block *entity.ExecutableBlock, _a3 snapshot.StorageSnapshot, derivedBlockData *derived.DerivedBlockData) (*execution.ComputationResult, error) {
    27  	ret := _m.Called(ctx, parentBlockExecutionResultID, block, _a3, derivedBlockData)
    28  
    29  	var r0 *execution.ComputationResult
    30  	var r1 error
    31  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, *entity.ExecutableBlock, snapshot.StorageSnapshot, *derived.DerivedBlockData) (*execution.ComputationResult, error)); ok {
    32  		return rf(ctx, parentBlockExecutionResultID, block, _a3, derivedBlockData)
    33  	}
    34  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, *entity.ExecutableBlock, snapshot.StorageSnapshot, *derived.DerivedBlockData) *execution.ComputationResult); ok {
    35  		r0 = rf(ctx, parentBlockExecutionResultID, block, _a3, derivedBlockData)
    36  	} else {
    37  		if ret.Get(0) != nil {
    38  			r0 = ret.Get(0).(*execution.ComputationResult)
    39  		}
    40  	}
    41  
    42  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, *entity.ExecutableBlock, snapshot.StorageSnapshot, *derived.DerivedBlockData) error); ok {
    43  		r1 = rf(ctx, parentBlockExecutionResultID, block, _a3, derivedBlockData)
    44  	} else {
    45  		r1 = ret.Error(1)
    46  	}
    47  
    48  	return r0, r1
    49  }
    50  
    51  type mockConstructorTestingTNewBlockComputer interface {
    52  	mock.TestingT
    53  	Cleanup(func())
    54  }
    55  
    56  // 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.
    57  func NewBlockComputer(t mockConstructorTestingTNewBlockComputer) *BlockComputer {
    58  	mock := &BlockComputer{}
    59  	mock.Mock.Test(t)
    60  
    61  	t.Cleanup(func() { mock.AssertExpectations(t) })
    62  
    63  	return mock
    64  }