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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	execution "github.com/onflow/flow-go/engine/execution"
     7  	flow "github.com/onflow/flow-go/model/flow"
     8  
     9  	ledger "github.com/onflow/flow-go/ledger"
    10  
    11  	mock "github.com/stretchr/testify/mock"
    12  
    13  	snapshot "github.com/onflow/flow-go/fvm/storage/snapshot"
    14  )
    15  
    16  // ViewCommitter is an autogenerated mock type for the ViewCommitter type
    17  type ViewCommitter struct {
    18  	mock.Mock
    19  }
    20  
    21  // CommitView provides a mock function with given fields: _a0, _a1
    22  func (_m *ViewCommitter) CommitView(_a0 *snapshot.ExecutionSnapshot, _a1 execution.ExtendableStorageSnapshot) (flow.StateCommitment, []byte, *ledger.TrieUpdate, execution.ExtendableStorageSnapshot, error) {
    23  	ret := _m.Called(_a0, _a1)
    24  
    25  	var r0 flow.StateCommitment
    26  	var r1 []byte
    27  	var r2 *ledger.TrieUpdate
    28  	var r3 execution.ExtendableStorageSnapshot
    29  	var r4 error
    30  	if rf, ok := ret.Get(0).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) (flow.StateCommitment, []byte, *ledger.TrieUpdate, execution.ExtendableStorageSnapshot, error)); ok {
    31  		return rf(_a0, _a1)
    32  	}
    33  	if rf, ok := ret.Get(0).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) flow.StateCommitment); ok {
    34  		r0 = rf(_a0, _a1)
    35  	} else {
    36  		if ret.Get(0) != nil {
    37  			r0 = ret.Get(0).(flow.StateCommitment)
    38  		}
    39  	}
    40  
    41  	if rf, ok := ret.Get(1).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) []byte); ok {
    42  		r1 = rf(_a0, _a1)
    43  	} else {
    44  		if ret.Get(1) != nil {
    45  			r1 = ret.Get(1).([]byte)
    46  		}
    47  	}
    48  
    49  	if rf, ok := ret.Get(2).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) *ledger.TrieUpdate); ok {
    50  		r2 = rf(_a0, _a1)
    51  	} else {
    52  		if ret.Get(2) != nil {
    53  			r2 = ret.Get(2).(*ledger.TrieUpdate)
    54  		}
    55  	}
    56  
    57  	if rf, ok := ret.Get(3).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) execution.ExtendableStorageSnapshot); ok {
    58  		r3 = rf(_a0, _a1)
    59  	} else {
    60  		if ret.Get(3) != nil {
    61  			r3 = ret.Get(3).(execution.ExtendableStorageSnapshot)
    62  		}
    63  	}
    64  
    65  	if rf, ok := ret.Get(4).(func(*snapshot.ExecutionSnapshot, execution.ExtendableStorageSnapshot) error); ok {
    66  		r4 = rf(_a0, _a1)
    67  	} else {
    68  		r4 = ret.Error(4)
    69  	}
    70  
    71  	return r0, r1, r2, r3, r4
    72  }
    73  
    74  type mockConstructorTestingTNewViewCommitter interface {
    75  	mock.TestingT
    76  	Cleanup(func())
    77  }
    78  
    79  // NewViewCommitter creates a new instance of ViewCommitter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    80  func NewViewCommitter(t mockConstructorTestingTNewViewCommitter) *ViewCommitter {
    81  	mock := &ViewCommitter{}
    82  	mock.Mock.Test(t)
    83  
    84  	t.Cleanup(func() { mock.AssertExpectations(t) })
    85  
    86  	return mock
    87  }