github.com/koko1123/flow-go-1@v0.29.6/state/cluster/mock/mutable_state.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 cluster "github.com/koko1123/flow-go-1/state/cluster" 8 9 mock "github.com/stretchr/testify/mock" 10 11 modelcluster "github.com/koko1123/flow-go-1/model/cluster" 12 ) 13 14 // MutableState is an autogenerated mock type for the MutableState type 15 type MutableState struct { 16 mock.Mock 17 } 18 19 // AtBlockID provides a mock function with given fields: blockID 20 func (_m *MutableState) AtBlockID(blockID flow.Identifier) cluster.Snapshot { 21 ret := _m.Called(blockID) 22 23 var r0 cluster.Snapshot 24 if rf, ok := ret.Get(0).(func(flow.Identifier) cluster.Snapshot); ok { 25 r0 = rf(blockID) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(cluster.Snapshot) 29 } 30 } 31 32 return r0 33 } 34 35 // Extend provides a mock function with given fields: candidate 36 func (_m *MutableState) Extend(candidate *modelcluster.Block) error { 37 ret := _m.Called(candidate) 38 39 var r0 error 40 if rf, ok := ret.Get(0).(func(*modelcluster.Block) error); ok { 41 r0 = rf(candidate) 42 } else { 43 r0 = ret.Error(0) 44 } 45 46 return r0 47 } 48 49 // Final provides a mock function with given fields: 50 func (_m *MutableState) Final() cluster.Snapshot { 51 ret := _m.Called() 52 53 var r0 cluster.Snapshot 54 if rf, ok := ret.Get(0).(func() cluster.Snapshot); ok { 55 r0 = rf() 56 } else { 57 if ret.Get(0) != nil { 58 r0 = ret.Get(0).(cluster.Snapshot) 59 } 60 } 61 62 return r0 63 } 64 65 // Params provides a mock function with given fields: 66 func (_m *MutableState) Params() cluster.Params { 67 ret := _m.Called() 68 69 var r0 cluster.Params 70 if rf, ok := ret.Get(0).(func() cluster.Params); ok { 71 r0 = rf() 72 } else { 73 if ret.Get(0) != nil { 74 r0 = ret.Get(0).(cluster.Params) 75 } 76 } 77 78 return r0 79 } 80 81 type mockConstructorTestingTNewMutableState interface { 82 mock.TestingT 83 Cleanup(func()) 84 } 85 86 // NewMutableState creates a new instance of MutableState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 87 func NewMutableState(t mockConstructorTestingTNewMutableState) *MutableState { 88 mock := &MutableState{} 89 mock.Mock.Test(t) 90 91 t.Cleanup(func() { mock.AssertExpectations(t) }) 92 93 return mock 94 }