github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/mock/consumer.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // Consumer is an autogenerated mock type for the Consumer type 11 type Consumer struct { 12 mock.Mock 13 } 14 15 // BlockFinalized provides a mock function with given fields: block 16 func (_m *Consumer) BlockFinalized(block *flow.Header) { 17 _m.Called(block) 18 } 19 20 // BlockProcessable provides a mock function with given fields: block, certifyingQC 21 func (_m *Consumer) BlockProcessable(block *flow.Header, certifyingQC *flow.QuorumCertificate) { 22 _m.Called(block, certifyingQC) 23 } 24 25 // EpochCommittedPhaseStarted provides a mock function with given fields: currentEpochCounter, first 26 func (_m *Consumer) EpochCommittedPhaseStarted(currentEpochCounter uint64, first *flow.Header) { 27 _m.Called(currentEpochCounter, first) 28 } 29 30 // EpochEmergencyFallbackTriggered provides a mock function with given fields: 31 func (_m *Consumer) EpochEmergencyFallbackTriggered() { 32 _m.Called() 33 } 34 35 // EpochSetupPhaseStarted provides a mock function with given fields: currentEpochCounter, first 36 func (_m *Consumer) EpochSetupPhaseStarted(currentEpochCounter uint64, first *flow.Header) { 37 _m.Called(currentEpochCounter, first) 38 } 39 40 // EpochTransition provides a mock function with given fields: newEpochCounter, first 41 func (_m *Consumer) EpochTransition(newEpochCounter uint64, first *flow.Header) { 42 _m.Called(newEpochCounter, first) 43 } 44 45 type mockConstructorTestingTNewConsumer interface { 46 mock.TestingT 47 Cleanup(func()) 48 } 49 50 // NewConsumer creates a new instance of Consumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 51 func NewConsumer(t mockConstructorTestingTNewConsumer) *Consumer { 52 mock := &Consumer{} 53 mock.Mock.Test(t) 54 55 t.Cleanup(func() { mock.AssertExpectations(t) }) 56 57 return mock 58 }