github.com/koko1123/flow-go-1@v0.29.6/engine/execution/computation/computer/mock/view_committer.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 ledger "github.com/koko1123/flow-go-1/ledger" 7 flow "github.com/koko1123/flow-go-1/model/flow" 8 9 mock "github.com/stretchr/testify/mock" 10 11 state "github.com/koko1123/flow-go-1/fvm/state" 12 ) 13 14 // ViewCommitter is an autogenerated mock type for the ViewCommitter type 15 type ViewCommitter struct { 16 mock.Mock 17 } 18 19 // CommitView provides a mock function with given fields: _a0, _a1 20 func (_m *ViewCommitter) CommitView(_a0 state.View, _a1 flow.StateCommitment) (flow.StateCommitment, []byte, *ledger.TrieUpdate, error) { 21 ret := _m.Called(_a0, _a1) 22 23 var r0 flow.StateCommitment 24 if rf, ok := ret.Get(0).(func(state.View, flow.StateCommitment) flow.StateCommitment); ok { 25 r0 = rf(_a0, _a1) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(flow.StateCommitment) 29 } 30 } 31 32 var r1 []byte 33 if rf, ok := ret.Get(1).(func(state.View, flow.StateCommitment) []byte); ok { 34 r1 = rf(_a0, _a1) 35 } else { 36 if ret.Get(1) != nil { 37 r1 = ret.Get(1).([]byte) 38 } 39 } 40 41 var r2 *ledger.TrieUpdate 42 if rf, ok := ret.Get(2).(func(state.View, flow.StateCommitment) *ledger.TrieUpdate); ok { 43 r2 = rf(_a0, _a1) 44 } else { 45 if ret.Get(2) != nil { 46 r2 = ret.Get(2).(*ledger.TrieUpdate) 47 } 48 } 49 50 var r3 error 51 if rf, ok := ret.Get(3).(func(state.View, flow.StateCommitment) error); ok { 52 r3 = rf(_a0, _a1) 53 } else { 54 r3 = ret.Error(3) 55 } 56 57 return r0, r1, r2, r3 58 } 59 60 type mockConstructorTestingTNewViewCommitter interface { 61 mock.TestingT 62 Cleanup(func()) 63 } 64 65 // 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. 66 func NewViewCommitter(t mockConstructorTestingTNewViewCommitter) *ViewCommitter { 67 mock := &ViewCommitter{} 68 mock.Mock.Test(t) 69 70 t.Cleanup(func() { mock.AssertExpectations(t) }) 71 72 return mock 73 }